Four common pitfalls of the BigDecimal class and how to avoid them
When doing business calculations in Java, especially for currencies, you would preferably use the java.math.BigDecimal class to avoid the problems related to floating-point arithmetic, which…