????Java?????????????????????
????1??System.out.printf(); ??????c?????printf???????磺
????int x = 55;
????System.out.format(“x = %5x”?? x);
?????????????x = 37
????2??System.out.format() int x = 55;
????System.out.printf(“x = %5c”?? x);
?????????????x = 7
????3??String.format() String????????????
????int x = 55;
????System.out.println(String.format(“x = %5x”?? x));
?????????????x = 37
????4??Formatter int x = 55;
????Formatter format = new Formatter(System.out);
????format.format(“x = %5x”?? x);
?????????????x = 37