public static void main(String[] args) {
System.out.println("Hello, World!"); // Hello, World! 출력 후 줄바꿈
System.out.println(100); // 100 출력 후 줄바꿈
System.out.printf("Boolean: %b\n", flag); // Boolean: true
System.out.printf("Decimal: %d\n", dec); // Decimal: 255
System.out.printf("Octal: %o\n", dec); // Octal: 377
System.out.printf("Hexadecimal: %x\n", dec); // Hexadecimal: ff
System.out.printf("Floating-point: %f\n", pi); // Floating-point: 3.141590
System.out.printf("Character: %c\n", 'A'); // Character: A
System.out.printf("String: %s\n", "Hello"); // String: Hello
System.out.printf("[%d]\n", number); // [10]
System.out.printf("[%5d]\n", number); // [ 10]
System.out.printf("[%-5d]\n", number); // [10 ]
System.out.printf("[%05d]\n", number); // [00010]
System.out.printf("%x\n", number); // fffff
System.out.printf("%#x\n", number); // 0xfffff
System.out.printf("%#X\n", number); // 0XFFFFF
double piValue = 3.141592653589793;
System.out.printf("%.1f\n", piValue); // 3.1
System.out.printf("%.2f\n", piValue); // 3.14
System.out.printf("%.3f\n", piValue); // 3.142
System.out.printf("%.4f\n", piValue); // 3.1416
System.out.printf("%.5f\n", piValue); // 3.14159
System.out.printf("%.6f\n", piValue); // 3.141593