In K&B, they describe the following two statements as having different meanings:
They say the first one creates one
String literal object in the pool and one reference, while the other one creates a String literal object in the pool, a String() object on the heap, and a String reference variable.
I understand what they are saying, but what is the fundamental difference here? Why does this happen, and what are the reasons for/implications of this?
Thanks very much!!