When is the Demo object eligible for garbage collection? (a) After line 5 (b) After line 6

Question:

When is the Demo object eligible for garbage collection?class Test { private Demo d; void start () { } } d = new Demo (); this.take Demo (d); /* Line 5 */ } /* Line

(a) After line 5

(b) After line 6

(c) After the start() method completes

(d) When the instance running this code is made eligible for garbage collection.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: