But you know what, I think combining String Objects and a question about Garbage Collection together is just mean. It ends up asking about two seperate things.
1. Garbage Collection 2. Which Strings are in the String Pool and which are Objects on the heap.
As there were only 3 objects and 2 are being referenced. So its "NICK" which is eligible for garbage collection. further u can't take name as object its only reference variable.