Welcome to DrJava. Working directory is C:\Users\rlkraft > System.out.println("How are you?") How are you? > "hello".length() 5 > "bye".length() 3 > "hello".toUpperCase() "HELLO" > "bye".toUpperCase() "BYE" > String s1 = "hello" > s1.length() 5 > s1.toUpperCase() "HELLO" > s1 "hello" > s1.charAt(2) 'l' > s1.charAt(4) 'o' > s1.charAt(0) 'h' > String s2 = "How are you?" > s2 "How are you?" > s2.length() 12 > s2.charAt(12) java.lang.StringIndexOutOfBoundsException: String index out of range: 12 at java.lang.String.charAt(Unknown Source) > s2.charAt(11) '?' > s2.charAt(3) ' ' > s1.charAt(3) 'l' > s2.endsWith("??") false > s2.endsWith("u?") true > s2.indexOf("are") 4 > s2.indexOf("Are") -1 > s1.replace("l", "k") "hekko" > s1 "hello" > s1.replace("l", "bob") "hebobbobo" > s1.replace("ll", "2") "he2o" > s1.replace("lll", "2") "hello" > "helllo".replace("ll", "2") "he2lo" > "hellllo".replace("ll", "2") "he22o" > s2 "How are you?" > s2.substring(2, 5) "w a" > s2.substring(8, s2.length()) "you?" > s2.substring(2, s2.length()) "w are you?" >