单项选择题

What is the result?()

A.Compilation fails.
B.An exception is thrown at runtime.
C.The variable first is set to null.
D.The variable first is set to elements[0].


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

What is the result?()

A.1
B.2
C.12
D.Compilation fails.
E.No output is produced.
F.An exception is thrown at runtime.

2.单项选择题

What is the result?()

A.2
B.24
C.234
D.246
E.2346
F.Compilation fails.

3.单项选择题

What is the result?()

A.23
B.234
C.235
D.2345
E.2357
F.Compilation fails.

4.单项选择题

What is the result as follows?()

A.5,6
B.5,5
C.6,5
D.6,6

5.单项选择题

What is the result when the go() method is invoked?()

A.00
B.0001
C.000120
D.00012021
E.Compilation fails.
F.An exception is thrown at runtime.

6.单项选择题

What is the result?()

A.2
B.3
C.1,2
D.2,3
E.1,2,3

7.单项选择题

What is the output?()

A.42
B.420
C.462
D.42042

8.多项选择题

Which two statements are true?()

A.Line 35 will not compile.
B.Line 36 will not compile.
C.Line 37 will not compile.
D.Line 38 will not compile.

10.单项选择题

String[] elements = { “for”, “tea”, “too” }; 
String first = (elements.length > 0)? elements[0] null; 
What is the result?()

A. Compilation fails.
B. An exception is thrown at runtime.
C. The variable first is set to null.
D. The variable first is set to elements[0].