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