is an immutable
object which represents a series of unicode characters.
means they cannot be modified.
But, for example,
string str = "You";
str = "Me";
, we are able to modify a string.
Hence, the important thing of immutability is about where the string
reference is pointing to.
In the above example, str
is pointed to "You"
and then it has been changed (pointed) to "Me"
Asked In: Spotted While Learning |