Java程序员认证模拟题及详细分析(1)计算机二级考试

文章作者 100test 发表时间 2009:04:30 08:55:09
来源 100Test.Com百考试题网


一.说明:(真实考试)
1.考试形式:网络计算机
2.考题形式:多选,单选,简答
3.题量:60
4.考试时间:120分钟

二.模拟题

1.Which statement about the garbage collection mechanism are true?
A. Garbage collection require additional programe 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 explicity and immediately frees the memory used by Java objects.
D. The garbage collection mechanism can free the memory used by Java Object at explection 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.
8) System.out.println(a).
9) }
In the absence of compiler optimization, which is the earliest point the object a refered is definitely elibile 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. In the class java.awt.AWTEvent,which is the parent class upon which jdk1.1 awt events are based there is a method called getID which phrase accurately describes the return value of this method?
A. It is a reference to the object directly affected by the cause of the event.
B. It is an indication of the nature of the cause of the event.
C. It is an indication of the position of the mouse when it caused the event.
D. In the case of a mouse click, it is an indication of the text under the mouse at the time of the event.
E. It tells the state of certain keys on the keybord at the time of the event.
F. It is an indication of the time at which the event occurred.

4. 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 addXxxxListener method as many times as is needed, specifying as many different listeners as your design require.

5.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 3
B. Doing it for l is 1
C. Doing it for l is 2
D. Doing it for l is 0
E. Doing it for l is ?C1
F. Finish

相关文章


2006年4月全国计算机等级考试二级JAVA笔试试题及答案计算机二级考试
2005年9月全国计算机等级考试二级JAVA笔试试题计算机二级考试
2005年4月全国计算机等级考试二级JAVA笔试试题及答案计算机二级考试
全国计算机等级考试二级Java样题计算机二级考试
Java程序员认证模拟题及详细分析(1)计算机二级考试
某一磁盘目录下将.txt的所有文件遍历打印到控制台上计算机二级考试
JAVA基础:eclipse.ini中各个参数的作用计算机二级考试
java辅导:Java中的几个术语的解释与关系计算机二级考试
扩展JQueryAjax请求错误机制 实现服务器端消息回馈计算机二级考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛