Java认证模考试题(四
百度广告
outer: for(int i=0;i< 3; i++)
inner: for(int j=0;j< 2;j++)
{
if(j==1) continue outer;
System.out.println(j+ ?and ?+i);
}
B. 0 and 1
C. 0 and 2
D. 1 and 0
E. 1 and 1
F. 1 and 2
G. 2 and 0
H. 2 and 1
I. 2 and 2
Explanation:
Correct Answer: A,B,C 21 of 60
Question: 22
switch (m)
{
case 0: System.out.println(Condition 0);
case 1: System.out.println(Condition 1);
case 2: System.out.println(Condition 2);
case 3: System.out.println(Condition 3);break;
default: System.out.println(Other Condition);
Which values of m will cause Condition 2 is output?
B. 1
C. 2
D. 3
E. 4
F. None
Explanation:
Correct Answer: A,B,C 22 of 60
Question: 23
A. init()
B. start()
C. stop()
D. destroy()
Explanation:
Correct Answer: B 23 of 60 |||
Question: 24
A. join()
B. resume()
C. notify()
D. notifyAll()
E. high priority thread is ready
Explanation:
Correct Answer: C,D 24 of 60
Question: 25
A. start()
B. init()
C. run()
D. main()
E. synchronized()
Explanation:
Correct Answer: C 25 of 60
Question: 26
A. native
B. static
C. synchronized
D. abstract
Explanation:
Correct Answer: C 26 of 60
Question: 27
A. private
B. public
C. protected
D. protect
E. friend
Explanation:
Correct Answer: A,B,C 27 of 60 |||
Question: 28
If a member variable of a class can be accessible only by the same package, which modifier should be used?
B. public
C. protected
D. no modifier
E. final
Explanation:
No modifier is the default access level. The default modifier means to be accessible by the classes in the same package.
Correct Answer: D 28 of 60
编辑推荐:
温馨提示:因考试政策、内容不断变化与调整,长理培训网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准! (责任编辑:长理培训)
点击加载更多评论>>