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 |