Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java SE 综合讨论区
打印话题 寄给朋友 订阅主题 |
作者 | 几道问题 有待解决 如能帮忙 不胜感激 |
xujunfbi
发贴: 7 积分: 0 |
于 2004-08-05 11:39
QUESTION NO: 49 Given: 10. public Object m() { 11. Object o = new Float(3.14F); 12. Object [] oa = new Object[1]; 13. oa[0] = o; 14. o = null; 15. oa[0] = null; 16. return 0; 17. } When is the Float object, created in line 11, eligible for garbage collection? A. Just after line 13. B. Just after line 14. C. Just after line 15. D. Just after line 16 (that is, as the method returns). -------------------------------------------------------------------------------- 1. public class Test { 2. public static void main(String[] args) { 3. int x = 0; 4. assert (x > 0): “assertion failed”; 5. System.out.println(“finished”); 6. } 7. } What is the result? A. finished B. Compilation fails. C. An AssertionError is thrown. D. An AssertionError is thrown and finished is output. ------------------------------------------------------------------------------------------------ Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class? (Choose two) A. If the hashCode values are different, the objects might be equal. B. If the hashCode values are the same, the object must be equal. C. If the hashCode values are the same, the objects might be equal. D. If the hashCode values are different, the objects must be unequal. Java应用者与<IDE/环境> |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
7661 | 几道问题 有待解决 如能帮忙 不胜感激 | xujunfbi | 1340 | 2004-08-05 11:39 |
6429 | Re:几道问题 有待解决 如能帮忙 不胜感激 | looluo | 12 | 2004-08-05 17:00 |
6630 | Re:几道问题 有待解决 如能帮忙 不胜感激 | kempguan | 3 | 2004-08-06 15:34 |
6265 | Re:几道问题 有待解决 如能帮忙 不胜感激 | czgdjzy | 90 | 2004-08-06 17:21 |
6380 | Re:几道问题 有待解决 如能帮忙 不胜感激 | bsspirit | 105 | 2004-08-08 23:35 |
6709 | Re:几道问题 有待解决 如能帮忙 不胜感激 | vk2001 | 529 | 2004-08-09 18:04 |
7049 | Re:几道问题 有待解决 如能帮忙 不胜感激 | vk2001 | 156 | 2004-08-09 18:10 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |