I want to calculate a percentage but when I multiply by 100 I get an error : bigdecimal is not defined for the type Im
Asked
Active
Viewed 1,157 times
1 Answers
0
- Try with new BigDecimal("100") instead of BigDecimal(100).
- Then perhaps you'll have to use Rounding and precision in your divide method, depending on your data : row1.col1.multiply(new BigDecimal("100")).divide(row1.col2,5,java.math.RoundingMode.HALF_UP);

Corentin
- 2,442
- 1
- 17
- 28