System.out.printf("%,5d %,6.1f\n", 312342, 3155623.932);
输出:312,342 3,155,623.9
System.out.printf("%05d %06.1f\n", 32, 32.32);
输出:00032 0032.3