Question 13
Back to Exercise
When does an object become eligible for garbage collection?
- A When its method finishes
- B When no live reference can reach it any more Correct
- C After one minute
- D When System.gc() is called
Correct Answer: Option B
The JVM then decides when to actually reclaim it.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!