System.out.printf ("Here is a double: %.2f" , double value or variable);
You can try something like this: double example = 0.24556; System.out.printf("Example: %.2f", example);