电话:0731-83595998
导航

Java经典模拟题(onlyfortrainning)(1)

来源: 2017-12-19 10:45

 百度广告

 一. 真实考试说明  
2.考题形式:多选,单选,简答  
4.考试时间:120分钟 

  

1.which statement about the garbage collection mechanism are true?  
b.the programmer can indicate that a reference through a local variable is no longer of interest.  
d.the garbage collection mechanism can free the memory used by java object at expectable time.  

2. give the following method:  
2) string a,b;  
4) b=new string("game over");  
6) a=null;  
system.out.println(a);  
in the absence of compiler optimization, which is the earliest point the object a referred is definitely hand to be garbage collection.  

3. which statement about listener is true?  
b.if multiple listener be add to a single component, the event only affected one listener.  
d.the listener mechanism allows you to call an addxxxlistener method as many times as is needed, specifying as many different listeners as your design require. 

4.give the following code:  
public static void main(string args ){  
do{  
}while(--l>;0)  
}  
which well be output:  
d. doing it for l is 0e. doing it for l is –1f. finish 

5. give the code fragment:  
2) case 1: system.out.println("test 1");break;  
4) case 3: system.out.println("test 2");break;  
6) }  
a. 1b. 2c. 3d. default  
6. give incompleted method:  
2){if(unsafe()){//do something…}  
4)}  
a.public ioexception methodname()  
c.public void methodname() throw ioexception  
e.public void methodname() throws exception 

7. give the code fragment:  
;4){  
else if (x>;9){  
else {  
which range of value x would produce of output "test 2"?  
;4c. x>;9d. none 

8. give the following method:  
try{  
system.out.println("test1");  
}finally{system.out.println("test 3");}  
which will display if method unsafe () run normally?  
9. which method you define as the starting point of new thread in a class from which new the thread can be execution?  
d. public static void main(string args)e. public void runnable() 

10.given the following class definition:  
protected int i;  
this.i=i;  
}  
select all valid answers:  
}  
}  
b(){system.out.println("i="+i);}  
d.class b{  
}  

编辑推荐:

下载Word文档

温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)

网络课程 新人注册送三重礼

已有 22658 名学员学习以下课程通过考试

网友评论(共0条评论)

请自觉遵守互联网相关政策法规,评论内容只代表网友观点!

最新评论

点击加载更多评论>>

精品课程

更多
10781人学习

免费试听更多

相关推荐
图书更多+
  • 电网书籍
  • 财会书籍
  • 其它工学书籍
拼团课程更多+
  • 电气拼团课程
  • 财会拼团课程
  • 其它工学拼团
热门排行

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端