inblog logo
|
An's Blog
    트러블 슈팅

    [트러블 슈팅] 9. “ 출력하는 방법

    윤설안's avatar
    윤설안
    Jun 10, 2025
    [트러블 슈팅] 9. “ 출력하는 방법
    ❗
    “는 문자열을 출력할 때 사용되어서 “ 출력하고 싶을 때에는 \를 앞에 붙여주면 된다.
    package test; public class Test { public static void main(String[] args) { String s = "ㅁㄴ"ㅇㄴㅁ"; } }
    해당코드는 오류가 난다 하지만 “ 앞에 \ 를 붙여주면 함께 출력이 된다.
    package test; public class Test { public static void main(String[] args) { String s = "ㅁㄴ\"ㅇㄴㅁ"; System.out.println(s); } }
    notion image
    Share article

    An's Blog

    RSS·Powered by Inblog