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)?

public class Eligible { public static void main(String[] args) { for (int

Select the one correct answer.

(a) 0

(b) 5

(c) 10

(d) Hard to say

public class Eligible { public static void main(String[] args) { for (int i= 0; i < 5; i++) { } } Eligible obj = new Eligible (); new Eligible (); } System.gc (); // (1)

Step by Step Solution

3.40 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

d It is difficult to say how many ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!