a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 73|回复: 0

[考试试题] 2011年JAVA认证模拟题第二阶段(10)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q28.What methods does JAVA define in the java.lang.Math class specifically for trigonometric calculations? Select all valid answers.9 n, F  q+ ~8 E8 B& g4 d7 A
  a. cos()
9 x& D1 L" F& c+ R/ w, C  b. asin()
  P/ I+ M) i6 h* M- A6 _& V$ X  c. arctan()
2 z7 T* V: E& W" I2 M0 u  x  d. sine()$ j+ {/ r! @2 U* f+ F$ ?% @
  Q29.Imagine that there are two exception classes called Exception1 and Exception2 that descend from the Exception class. Given these two class definitions,
  w/ W# P/ o. i6 W% `7 }  1. class First {
: Y8 t5 ~- {/ r* N- k& j/ G6 C  2. void test() throws Exception1, Exception2 { . . . }3 }! r. f$ e: `: u9 ^" p5 u+ s
  3. }
5 V9 P1 D  ?5 C4 ?: K  a  4. class Second extends First {
7 @4 s# h  o7 v- [) K  5. void test() { . . . }2 x8 F1 A  l, s% _8 Z! u
  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.
, T! X+ s/ `4 H8 R  a. Exception1
1 ^+ V( D" y. P* j  b. Exception2- g5 F0 g2 [' N& O! M' n: w
  c. no checked exceptions
7 ~* ^% ?. M2 \6 |) O! O% O  d. any exceptions declared in the throws clause of the Third's test() method.1 P: |$ [/ p5 O0 w: s6 h
  Q30.Given these code snippets,# J5 S& }7 F3 B0 H0 z
  1. Boolean b1 = new Boolean(true);
: P1 _! _- ^6 H* v  2. Boolean b2 = new Boolean(true);
$ s8 _  N' \; B* G5 z  which expressions are legal JAVA expressions that return true? Select all valid answers.; F# }5 ?" ~' t! \2 B1 r
  a. b1 == b2
6 \5 x5 O& Y" I2 p$ n4 ?  b. b1.equals(b2)- b( [2 \2 ]* h
  c. b1 & b26 \( w% @% x7 n- M
  d. b1 || b2
; ?) ]7 j! w: m+ |' D9 o( L0 ~  28. ab2 Z5 P+ M0 M1 b3 ?, I. M4 l2 C( [3 I# Z
  29. c
; ~7 z9 x: @( X  30. b
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 01:45 , Processed in 0.269250 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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