I have an extremely large number and I use the BigDecimal type,
But now I want to round up a BigDecimal, as follows: If the number is 10803432.12, it will round down to 10803432 and if the number is 10803432.69, it will round to 10803433 So how to do it, My Code:
BigDecimal bigDecimal = new BigDecimal("10803432.12");
MathContext mc = new MathContext(0);
System.out.println(bigDecimal.round(mc));