a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 267|回复: 1

[考试试题] 2011年JAVA认证模拟题(54)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q160 Which are keywords in Java?+ {- A5 p* j0 j
  A NULL
* m# W; g, S5 _( W6 g  B sizeof
8 X' K' I$ K8 [; Q$ |) g6 Q. p9 S0 z  C friend' Q6 I9 _  o! n+ j* `
  D extends
6 {- p1 O0 R/ z; y" v  E synchronized. z) C7 ?( r) I
  Q161 Which of the following thread state transitions are valid?- s* y8 j  f3 g' ?
  A From ready to running.
2 A) T- J9 q8 h  B From running to ready.
: Y8 l7 @  h' {" V  C From running to waiting.1 \# @6 b, z' N" S5 h" D
  D From waiting to running.
6 J* y: K7 P- w$ b" j5 i( u  E From waiting to ready.
" A. u( l2 O/ B3 I+ b  F From ready to waiting.0 R0 `; R$ t+ @1 O) c( c. O
  Q162 What is wrong with the following program?3 s0 w7 B! x! b" q

' s+ i+ n: i; S; {; n  class Question { String s = “abc”;
回复

使用道具 举报

 楼主| 发表于 2012-8-4 12:33:17 | 显示全部楼层

2011年JAVA认证模拟题(54)

</p>  public static void main (String [] args). t. v9 v' N6 T# f
  {; n9 z4 d1 L. M- ^: B3 T1 V/ e- h! V
  System.out.println(s);6 V8 J9 E$ @: M# T
  }$ T: Q" Z- S, u& l1 z* o6 o( `
  }
/ @$ N0 V) Q6 P6 ^$ X$ |/ H- g1 P  A Nothing is wrong with the program
  T% f4 O  Y' i8 d" d. ~  B main() cannot be declared public because Question is not public.+ t) O" d: i, e3 D. [* D! p# Z0 f
  C Because main() is static, it may not access non-static s without a reference to an instance of Question.
" }8 f  v4 n% s  ?; |  D The main() argument list is incorrect.6 l3 i2 M& d8 p3 U/ G' H0 u/ W
  Q160 DE
# I  h+ q: E. [  Q161 ABCE) u; D/ @. N0 v4 o4 m$ d8 y
  Q162 C
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-21 09:54 , Processed in 0.192715 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表