[JAVA] 특수문자의 출력

JAVA 2026. 1. 27. 14:49
728x90

출력하기 !@#$%^&*(\'"<>?:;


import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        String result = "!@#$%^&*(\\\'\"<>?:;";
        System.out.println(result);
    }
}


// 	' -> \'		작은 따옴표
// 	" -> \"		큰 따옴표
// 	\ -> \\		백슬래시
728x90
Posted by 바르마스
,