how to print only 2 decimal points in java code example Example: java printf double 2 decimal places printf("%. 2f", value);