+ 2
What is meant by "Strings are not mutable." I cannot understand it inspite of it we can change the value of string through out ?
2 Réponses
+ 7
you do not actually change the content of the string, but rather create a new one
in java for instance, the old string will remain in the memory until the garbage collector will clear it
+ 5
once if you create a string object you cannot modify that string but only thing you can do is you can refer the ref of string object to another string object