- The BigDecimal.equals method does not think that 2.0 is equals to 2.00, but compareTo does.
- equals
- new Integer(0).equals(new BigDecimal(0)): false
- new Integer(0).toString().equals(new BigDecimal(0).toString()): true
* Reference
- Java BigDecimal equals vs. comareTo | Xinotes
沒有留言:
張貼留言