java round to decimals code example Example: java round 2 decimal places Math.round(input * 100.0) / 100.0;