SyntaxFix
Write A Post
Hire A Developer
Questions
BigDecimal a = new BigDecimal("12345.0789"); a = a.divide(new BigDecimal("1"), 2, BigDecimal.ROUND_HALF_UP); //Also check other rounding modes System.out.println("a >> "+a.toPlainString()); //Returns 12345.08