BigDecimal is used to compare the size of two values, removing the 00 after the decimal point

BigDecimal.stripTrailingZeros() function is to go to the back of 0
CompareTo method of BigDecimal to compare. The result returned is of type int, -1 means less than, 0 means equal, and 1 means greater than

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326360990&siteId=291194637