February 2014
Beginner
1248 pages
62h 25m
English
A BigDecimal’s scale is the number of digits to the right of its decimal point. If you need a BigDecimal rounded to a specific digit, you can call BigDecimal method setScale. For example, the following expression returns a BigDecimal with two digits to the right of the decimal point and using bankers rounding:
amount.setScale(2, RoundingMode.HALF_EVEN)
Read now
Unlock full access