Почему следующий код печатает 0.00, а не 0?
BigDecimal big = new BigDecimal("0.00");
big = big.stripTrailingZeros();
System.out.println(big.toPlainString());
Ниже приведена документация для stripTrailingZeroes:
Returns BigDecimal which is numerically equal to this one but with any trailing zeros removed from the representation. For example, stripping the trailing zeros from the BigDecimal value 600.0, which has [BigInteger, scale] components equals to [6000, 1], yields 6E2 with [BigInteger, scale] components equals to [6, -2]
Returns:
a numerically equal BigDecimal with any trailing zeros removed.
stripTrailingZeros. Ну разве что метод должен существовать, но не более того. - person Roland Illig   schedule 09.03.2011