price with 2 decimals in java code example
Example 1: how to format a double in java to 2 decimal places
DecimalFormat df = new DecimalFormat("#.00");
Example 2: 2 decimal places print format JAVA
printf(%.2f);
DecimalFormat df = new DecimalFormat("#.00");
printf(%.2f);