how to round double in java to 2 decimal places code example Example: java double 2 decimal String result = String.format("%.2f", value);