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

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

  Q43.What is written to the standard output given the following statement 1. System.out.println(4 | 7);  a. 4
  b. 5
  c. 6
  d. 7
  Q44.What expressions are true concerning the following lines of code?
  1. int[] arr = {1, 2, 3};
  2. for(int i = 0 ; i < 2; i++)
  3. arr = 0;
  Select all valid answers.
  a. arr == 0
  b. arr == 2
  c. arr == 0
  d. arr == 3
  Q45.What will the following block of code write to standard output when it is executed?
  1. int i = 3;
  2. int j = 0;
  3. double k = 3.2;
  4. if (i < k)
  5. if (i == j)
  6. System.out.println(i);
  7. else
  8. System.out.println(j);
  9. else
  10. System.out.println(k);
  a. 3
  b. 0
  c. 3.2
  d. None of these.
  43. d
  44. acd
  45. b
页: [1]
查看完整版本: 2011年JAVA认证模拟题第二阶段(15)