回到考试中心首页|兰州学生网LOGO
首页  |  外语考试  |  IT认证  |  基础教育  |  甘肃省专升本  |  学历考试  |  硕士学历  |  公务员  |  会计考试  |  职业资格  |  医学医药  |  建筑工程
会员登录
热门文章
·二级建造师模拟试题一套
·公务员面试自我介绍范文
·践行社会主义荣辱观 党课讲稿
·八荣八耻,从我做起!
·临床执业医师考试真题完全版(一)
·学习八荣八耻心得体会(完善版)
·八荣八耻演讲稿
·八荣八耻歌(歌词)
·英文自我介绍
·中学:教师资格认证考试全真模拟试卷和答案
·八荣八耻中学生演讲稿
·小学教师资格考试教育学仿真试题之一
·八荣八耻手抄报内容
·《八荣八耻歌》歌词 伴奏及曲牌
·暑期实践报告
广告推荐
Java认证经典模拟题(onlyfortrainning)
作者: 来源: 责任编辑: 更新日期:2006-3-27 19:45:47 浏览:
Java认证经典模拟题(onlyfortrainning)

一. 真实考试说明
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.
A. before line 3 B.before line 5 C. before line 6 D.before line 7 E. Before line 9

3. Which statement about listener is true?
A.Most component allow multiple listeners to be added.
B.If multiple listener be add to a single component, the event only affected one listener.
C.Component don’t allow multiple listeners to be add.
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 class Example{
public static void main(String args[] ){
int l=0;
do{
System.out.println(“Doing it for l is:”+l);
}while(--l>;0)
System.out.println(“Finish”);
}
}
Which well be output:
A. Doing it for l is 3B. Doing it for l is 1C. Doing it for l is 2
D. Doing it for l is 0E. Doing it for l is –1F. Finish

5. Give the code fragment:
1)switch(x){
2) case 1: System.out.println(“Test 1”);break;
3) case 2:
4) case 3: System.out.println(“Test 2”);break;
5) default: System.out.println(“end”);
6) }
which value of x would cause “Test 2” to the output:
A. 1B. 2C. 3D. default

6. Give incompleted method:
1)
2){if(unsafe()){//do something…}
3)else if(safe()){//do the other…}
4)}
The method unsafe() will throw an IOException, which completes the method of declaration when added at line one?
A.public IOException methodName()
B.public void methodName()
C.public void methodName() throw IOException
D.public void methodName() throws IOException
E.public void methodName() throws Exception

7. Give the code fragment:
if(x>;4){
System.out.println(“Test 1”);}
else if (x>;9){
System.out.println(“Test 2”);}
else {
System.out.println(“Test 3”);}
Which range of value x would produce of output “Test 2”?
A. x<4B. x>;4C. x>;9D. None

8. Give the following method:
public void example(){
try{
unsafe();
System.out.println(“Test1”);
}catch(SafeException e){System.out.println(“Test 2”);
}finally{System.out.println(“Test 3”);}
System.out.println(“Test 4”);
Which will display if method unsafe () run normally?
A. Test 1B. Test 2C. Test 3D. Test 4
9. Which method you define as the starting point of new thread in a class from which new the thread can be execution?
A. public void start()B. public void run()C. public void int()
D. public static void main(String args[])E. public void runnable()

10.Given the following class definition:
class A{
protected int i;
A(int i){
this.i=i;

本文章共11页,当前在第1页  1  2  3  4  5  6  7  8  9  10  11  

打印本文 收藏本文 返回顶部 关闭窗口
   考试中心分类导航
      外语考试 | 英语四六级 | 专四专八 | 职称英语 | 口译笔译 | 商务英语 | 实用英语 | 托福 | 雅思 | GRE | LSAT | PETS | GMAT
      IT认证 | 计算机等级 | 软件程序员 | 微软认证 | 思科认证 | Oracle | Linux | JAVA
      甘肃省专升本 | 专升本动态 | 招生计划 | 考试大纲 | 专升本试题    基础教育 | 中考 | 高考    学历考试 | 成人高考 | 自学考试
      硕士学历 | 考研 | MBA/EMBA | 在职硕士 | 法律硕士 | 会计硕士 | 工程硕士    公务员 | 考试动态 | 考试指导 | 考试真题 | 模拟题 | 技巧心得
      医学医药 | 执业护士 | 执业医师 | 执业药师    会计考试 | 资产评估 | 经济师 | 从业资格 | 会计职称 | 注会 | 注税 | 高级会计 | ACCA/CAT | 精算师
      职业资格 | 保险考试 | 报关员 | 外销员 | 物流师 | 报检员 | 司法考试 | 律师考试 | 商务师 | 人力资源 | 电子商务 | 导游资格 | 证券考试 | 教师资格
      建筑工程 | 岩土师 | 室内设计师 | 质量资格 | 房产估价 | 土地估价 | 建造师 | 造价师 | 建筑师 | 结构师 | 监理师 | 咨询师 | 城市规划 | 安全工程师
设为首页   |    收藏本站   |    网站帮助   |    网站地图   |    意见反馈   |    关于我们   |    广告服务   |    联系办法
陇ICP备05005179 不良信息举报