Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 240 Bytes

File metadata and controls

8 lines (7 loc) · 240 Bytes

BigDecimal's equals method compares the scale of the representation as well as the numeric value, which may not be expected.

BigDecimal a = new BigDecimal("1.0");
BigDecimal b = new BigDecimal("1.00");
a.equals(b); // false!