What is the guaranteed accuracy of multiplication operator for double values in java?
For example, 2.2 * 100 is 220.00000000000003, but 220 is a double number. 220
you can use BigDecimal, but make sure that you use the construct of BigDecimal(String) rather than BigDecimal(double). The difference between them is: