If you look through the
API Spec for String, you'll see that all of the methods that "change" a String really return a new String. The methods concat, replace, toUpperCase, etc. all return new String objects. They don't actually change the String you're working on, they just give you a new one back based on what you wanted to do. Look at this example:
You see, s isn't actually modified until you assign the new, returned, value to it.