Re: what is the need for copy constructor in String class?



Piper707@xxxxxxxxxxx wrote:
Thank you to everyone who responded, specially Eric - that was a clear
explanation.

With regards to Joshua's comment, if literals do not get garbage
collected, would that not pose a problem from a memory point of view
if my program has a lot of strings? Does the size of the string
constant pool vary dynamically or is it fixed?

You can't create new string literals/constants at runtime, so this
isn't a problem.

--
Steve Wampler -- swampler@xxxxxxxx
The gods that smiled on your birth are now laughing out loud.
.