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](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1706/9/5/3/68065be0bd0ebe071706953680581.jpg)
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
d It is difficult to say how many ... View full answer
Get step-by-step solutions from verified subject matter experts
