When String is immutable, what happens to original content ?

If String is immutable and with 'final' and reference alone changed, when we make change in content, what will happen to old object ?

i.e.String name="John";

name="smith";

Whether String object "John" will be kept in memory or where it will go after change?

[334 byte] By [baskarka] at [2007-11-26 23:49:17]
# 1
If nothing else refers to it it becomes eligible for GC.
ejpa at 2007-7-11 15:25:43 > top of Java-index,Java Essentials,Java Programming...