Sign in
chromium
/
external
/
github.com
/
google
/
error-prone
/
refs/heads/copybara-sync
/
.
/
docs
/
bugpattern
/
BigDecimalEquals.md
blob: e8178760db70e99ad1a530b9fa0f17b88c0315a6 [
file
] [
log
] [
blame
] [
view
] [
edit
]
`BigDecimal`'s equals method compares the scale of the representation as well as
the numeric value, which may not be expected.
```java
BigDecimal a = new BigDecimal("1.0");
BigDecimal b = new BigDecimal("1.00");
a.equals(b); // false!
```