110. What is the result ?
A. N
D. R
G. Z
B. NZ
E. RZ
H. FZ
C. NFZ
F. RFZ
I. nullFZ
111. 2. Given :
Which command line will throws exception?(Choose all
that a pply. )
A. java OneArg
B. java -ea OneArg
C. java -ea -esa OneArg
D. java -ea:OneArg OneArg a
E. java -ea:OneArg OneArg a b
F. java -ea:flag OneArg a b
112.
113. 3. Given:
Which statement is true?
A. This code prints nothing.
B. This code prints "ok".
C. An exception is thrown at runtime.
D. Compilation fails at line 5.
E. Compilation fails at line 10.
114.
115. 4. Given:
What will be thrown at runtime?
A. java.lang.ArrayIndexOutOfBoundsException
B. java.lang.ExceptionInInitializerError
C. java.lang.NoClassDefFoundError
D. java.lang.IllegalArgumentException
E. java.lang.IllegalStateException
117. Which statements are true? (Choose all that apply.)
A. The program will carsh and stop at line 4.
B. The exception will be propagated back to line 11.
C. The code i[1]+=2; at line 3 will be executed.
D. The output is 2.
E. The output is 6.
F. The output is 7.
119. What is the result?
A. no.bye.
B. yes.bye.
C. bye.
D. yes.
E. A Throwalbe object is thrown at runtime.
F. An Exception object is thrown at runtime.
G. Compilation fails.
120. 7. Given:
What is the result?
A. Compilation fails.
D. no.
B. yes.
E. no.bye.
C. yes.bye.
F. bye.
121. 8. Given:
Which code, inserted at line 2, is the appropriate way to
handle a null-value parameter?
A.
B.
C.
D.
E.
assert(obj != 0);
assert(obj == null);
assert obj != null:"null";
if(obj == null) { throw new AssertionError("null"); }
if(obj == null) { throw new IllegalArgumentException("null"); }