Lecture 23
17
Changing String contents (NOT)
•These methods return a new String:                      they do not change the String getting the message!
•s.toUpperCase() returns “HELLO, WORLD”
•s.replace(‘o’,‘x’) returns “hellx, wxrld”
•s.concat(“!”) returns “hello, world!” 
•s += “!” returns “hello, world!” 
•s.concat(‘!’) returns “hello, world!” 
•“  x y z \t\b”.trim() returns “x y z”