I have a requirement where I need to divide one BigDecimal
number by 100 and show the exact amount that comes up without removing trailing zeros. But zeros are getting trimmed by default. How do I prevent that?
BigDecimal endDte = new BigDecimal("2609.8200");
BigDecimal startDte = new BigDecimal("100");
BigDecimal finalPerformance = endDte.divide(startDte);
System.out.println(finalPerformance.toString());
Output: 26.0982
Expected: 26.098200