I would try bd.remainder(BigDecimal.ONE).
Uses the remainder method and the ONE constant.
BigDecimal bd = new BigDecimal( "23452.4523434" );
BigDecimal fractionalPart = bd.remainder( BigDecimal.ONE ); // Result: 0.4523434
I would try bd.remainder(BigDecimal.ONE).
Uses the remainder method and the ONE constant.
BigDecimal bd = new BigDecimal( "23452.4523434" );
BigDecimal fractionalPart = bd.remainder( BigDecimal.ONE ); // Result: 0.4523434