This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
What you are doing here is telling the JVM to create a brand new string "3", and change s3 to refer to it. the original string that s3 USED to refer to hasn't changed... if you print s1, it'll still print "1".
in other words, you can chage what string a reference points to, you can create new string, but you CAN'T change an old string.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors