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