public class Main { public static void main(String[] argv) throws Exception { System.out.printf("Use group separators: %,.2f\n\n", 123456.87); } } //Use group separators: 123,456.87