当前位置:SCJP程序员认证考试题库

问题:

[单选]

12. void start() { 
13. A a = new A(); 
14. B b = new B(); 
15. a.s(b); 
16. b = null; 
17. a = null; 
18. System.out.println(“start completed”);
19. } 
When is the B object, created in line 14, eligible for garbage collection?()  

A .  After line 16.
B .  After line 17.
C .  After line 18 (when the methods ends).
D .  There is no way to be absolutely certain.
E .  The object is NOT eligible for garbage collection.

器官 对个人理财的发展产生影响的外部环境主要有:() 社会环境。 经济环境。 金融环境。 技术环境。 对业主而言,成本加酬金合同形式的优点有()。 可以通过成本控制提高经济效益。 可以通过分段施工缩短工期。 可以减少承包商的对立情绪。 可以利用承包商的施工技术专家,帮助改进或弥补设计中的不足。 可以根据自身力量和需要,较深人地介入和控制工程施工和管理。 在怀孕后的头五个月,母亲生病对胎儿影响最大。 地表水资源可利用量

12. void start() { 
13. A a = new A(); 
14. B b = new B(); 
15. a.s(b); 
16. b = null; 
17. a = null; 
18. System.out.println(“start completed”);
19. } 
When is the B object, created in line 14, eligible for garbage collection?()  

参考答案:

  参考解析

The correct answer to this question is D. The member method s is not defined so there is no way to be certain of the result. 

在线 客服