hi siva
String is an immutable class,which means that once a String object is created,we can not change it.
The method of the String class,such as toUpperCase do not modify the original string;they return a new string.
This is
Java adopts this immutablility restriction to implement an efficient memory allocation scheme for managing string object.
If it is not clear,please post a reply