According to my understanding, the line 1 creates a
string literal "Hello" in the string pool. However, this one is not used for reference s: another string object is created in the heap.
Now, the string "Hello" created in the pool, does not have a reference.
So in the lines 2 and 3,is the same string "Hello" used from the pool used or is a new string created in the pool?
At the end of these lines of code, how many objects are in the pool?
I feel the first "Hello" in pool cannot be used later. Pls confirm.