Question: How many objects are eligible for garbage collection when control reaches (1)? Select the one correct answer. (a) 0 (b) 5 (c) 10 (d) Hard
How many objects are eligible for garbage collection when control reaches (1)?

Select the one correct answer.
(a) 0
(b) 5
(c) 10
(d) Hard to say
public class Link ( private Link next; Link (Link next) {this.next = next; } public void finialize() { System.out.print ("X"); } public static void main(String[] args) { Link p= null; for (int i = 0; i < 5; i++) { p = new Link (p); System.gc (); // (1);
Step by Step Solution
3.37 Rating (166 Votes )
There are 3 Steps involved in it
a All the object... View full answer
Get step-by-step solutions from verified subject matter experts
