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

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

  Q28.What methods does JAVA define in the java.lang.Math class specifically for trigonometric calculations? Select all valid answers.
  a. cos()
  b. asin()
  c. arctan()
  d. sine()
  Q29.Imagine that there are two exception classes called Exception1 and Exception2 that descend from the Exception class. Given these two class definitions,
  1. class First {
  2. void test() throws Exception1, Exception2 { . . . }
  3. }
  4. class Second extends First {
  5. void test() { . . . }
  Create a class called Third that extends Second and defines a test() method. What exceptions can Third's test method throw? Select all valid answers.
  a. Exception1
  b. Exception2
  c. no checked exceptions
  d. any exceptions declared in the throws clause of the Third's test() method.
  Q30.Given these code snippets,
  1. Boolean b1 = new Boolean(true);
  2. Boolean b2 = new Boolean(true);
  which expressions are legal JAVA expressions that return true? Select all valid answers.
  a. b1 == b2
  b. b1.equals(b2)
  c. b1 & b2
  d. b1 || b2
  28. ab
  29. c
  30. b
页: [1]
查看完整版本: 2011年JAVA认证模拟题第二阶段(10)