考试网 >> IT认证 >> JAVA >> JAVA题库 >> Java经典模拟题(onlyfortrainning)

Java经典模拟题(onlyfortrainning)

发布时间:2006-06-28 10:49     点击:
分页:[1] 2 3 4 5 6 7 8 9 10  下一页  后10页

一. 真实考试说明 

1.考试形式:网络计算机 

2.考题形式:多选,单选,简答 

3.题量:60 

4.考试时间:120分钟 

 

二.模拟题 

1.Which statement about the garbage collection mechanism are true? 

A.Garbage collection require additional program code in cases where multiple threads are running. 

B.The programmer can indicate that a reference through a local variable is no longer of interest. 

C.The programmer has a mechanism that explicit and immediately frees the memory used by Java objects. 

D.The garbage collection mechanism can free the memory used by Java Object at expectable time. 

E.The garbage collection system never reclaims memory from objects while are still accessible to running user threads. 

2. Give the following method: 

1)public void method( ){ 

2) String a,b; 

3) a=new String(“hello world”); 

4) b=new String(“game over”); 

5) System.out.println(a+b+”ok”); 

6) a=null; 

7) a=b; 

System.out.println(a); 

9) } 

In the absence of compiler optimization, which is the earliest point the object a referred is definitely hand to be garbage collection. 
分页:[1] 2 3 4 5 6 7 8 9 10  下一页  后10页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有