How to round double / float value to 2 decimal points in Java
As i know, you can round double or float value to 2 decimal points in two ways : Math.round(double*100.0)/100.0 DecimalFormat(“###.##”) The DecimalFormat is self-explanatory, but the Math.round may need a bit explanation, see below two examples : Case 1 ....