会计考友 发表于 2012-8-4 12:33:16

2011年JAVA认证模拟题(54)

  Q160 Which are keywords in Java?
  A NULL
  B sizeof
  C friend
  D extends
  E synchronized
  Q161 Which of the following thread state transitions are valid?
  A From ready to running.
  B From running to ready.
  C From running to waiting.
  D From waiting to running.
  E From waiting to ready.
  F From ready to waiting.
  Q162 What is wrong with the following program?

  class Question { String s = “abc”;

会计考友 发表于 2012-8-4 12:33:17

2011年JAVA认证模拟题(54)

</p>  public static void main (String [] args)
  {
  System.out.println(s);
  }
  }
  A Nothing is wrong with the program
  B main() cannot be declared public because Question is not public.
  C Because main() is static, it may not access non-static s without a reference to an instance of Question.
  D The main() argument list is incorrect.
  Q160 DE
  Q161 ABCE
  Q162 C
页: [1]
查看完整版本: 2011年JAVA认证模拟题(54)