In the text the author mentions that string objects cannot be altered once they have been instantiated. If you manipulate a phrase or group of words then each manipulation creates a new string object.
I am wondering why this is. In a program where a lot of strings would be used - say a word processing program, wouldn't there be an issue of running out of memory? It seems at first glance that creating an entirely new string for every alteration would be inefficient, but I am sure there is some reason that I am just not privy to.
Anyone know?
Ken w