use backslash escape character
public static void main(String args[]) { String str1 = "\"hello\""; String str2 = "quotes \" with\r\n" + "multiline \""; }