How can I round BigDecimal objects to 2 decimals always (even if my BigDecimal object has no decimals)?
I'm doing:
myBigDecimal.setScale(2, RoundingMode.HALF_UP); // works fine when it has decimals
Context: I have a List of POJO's that when I send to the front end I give them format in ExtJs
BUT
I am generating a CSV file also and I've been required that all of the economic fields have 2 decimals.
Any ideas or work arounds?
Thx