When can an object become eligible for garbage collection?
Practice this question from Quiz: Memory Management, with options and an explanation.
Question
When can an object become eligible for garbage collection?
Option A — Correct answer
When it is no longer reachable from live references
GC traces reachable objects; unreachable objects can be reclaimed.
Option B
Immediately after construction
Option C
When it is public
Option D
When it is final