/** String literals */ public class TestString1 { public static void main(String[] args) { String text = "Hello Earth"; System.out.println(text); // \ = escape = next character is weird text = "Spock said \"Hello Earth\" and then vaporized it!"; System.out.println(text); text = "C:\\planets\\earth"; System.out.println("path = " + text); // \t = tab text = "Hello\t\tEarth"; System.out.println(text); // \n = newline text = "Hello\nEarth"; System.out.println(text); } }