试题详情
单项选择题 1. class Test {  2. private Demo d;  3. void start() {  4. d = new Demo();  5. this.takeDemo(d); 6. }  7.   8. void takeDemo(Demo demo) {  9. demo = null;  10. demo = new Demo(); 11. }  12. }  When is the Demo object, created on line 3, eligible for garbage collection?()  

A、 After line 5.

B、 After line 9.

C、 After the start() method completes.

D、 When the takeDemo() method completes.

E、 When the instance running this code is made eligible for garbage collection.

  • E
  • 关注下方微信公众号,在线模考后查看

热门试题