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

2011年JAVA认证模拟题第二阶段(14)

  Q40.Which keyword, when used in front of a method, must also appear in front of the class.  a. synchronized
  b. abstract
  c. public
  d. private
  Q41.Given this code snippet,
  1. try {
  2. tryThis();
  3. return;
  4. } catch(IOException x1) {
  5. System.out.println(“exception 1”);
  6. return;
  7. } catch(Exception x2) {
  8. System.out.println(“exception 2”);
  9. return;
  10. } finally {
  11. System.out.println(“finally”);
  12. }
  what will appear in the standard output if tryThis() throws a IOException?
  a. “exception 1” followed by “finally”
  b. “exception 2” followed by “finally”
  c. “exception 1”
  d. “exception 2”
  Q42.Given the code snippet,
  1. double a = 90.7;
  2. double b = method(a);
  3. System.out.println(b);
  if this snippet displays 90.0 in the standard output, what Math method did method() invoke? Select all valid answers.
  a. abs()
  b. round()
  c. floor()
  d. ceil()
  40. b
  41. a
  42. c
页: [1]
查看完整版本: 2011年JAVA认证模拟题第二阶段(14)