Garbage Collection
© examsiri.com
Question : 5 of 7
Marks:
+1,
-0
Given:
When /*doStuff*/ is reached, how many objects are eligible for GC?
class CardBoard {
  Short story = 5;
  CardBoard go(CardBoard cb) {
   cb = null;
   return cb;
  }
  public static void main(String[] args) {
   CardBoard c1 = new CardBoard();
   CardBoard c2 = new CardBoard();
   CardBoard c3 = c1.go(c2);
   c1 = null;
   /*do Stuff*/
  } }When /*doStuff*/ is reached, how many objects are eligible for GC?
Go to Question: