What happens to an object when one reference to it is set to null?
Answer & explanation
Answer: It is collectible only if no relevant reachable references remain
Garbage collection is based on reachability, not one variable assignment.
Practice objects & references with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
Answer: It is collectible only if no relevant reachable references remain
Garbage collection is based on reachability, not one variable assignment.