1
12
14
123
第1题:
test
Exception
Compilation fails.
NullPointerException
第2题:
Compilation fails.
An exception is thrown at runtime.
The code executes normally and prints "sleep".
The code executes normally, but nothing is printed.
第3题:
B
B, followed by an Exception.
Compilation fails due to an error on line 9.
Compilation fails due to an error on line 14.
An Exception is thrown with no other output.
第4题:
Compilation fails.
An exception is thrown at runtime.
The code executes and prints "running".
The code executes and prints "runningrunning".
The code executes and prints "runningrunningrunning".
第5题:
<b></b>
<b>12</b>
The JSP fails to execute.
<% int i = 12 %><b><%= i %></b>
第6题:
A
B
C
D
E
第7题:
10
12
14
17
第8题:
null
finally
null finally
Compilation fails.
finally exception
第9题:
An Exception is thrown with no other output
followed by an Exception
Compilation fails due to an error on line 9
Compilation fails due to an error on line 14
第10题:
True
Not true
An exception is thrown at runtime.
Compilation fails because of an error at line 12.
Compilation fails because of an error at line 19.
第11题:
5,6
5,5
6,5
6,6
第12题:
1
2
12
Compilation fails.
No output is produced.
An exception is thrown at runtime.
第13题:
2
3
12
23
123
Compilation fails.
An exception is thrown at runtime.
第14题:
2
24
234
246
2346
Compilation fails.
第15题:
0
The result is undefined.
a
2
1
c
b
第16题:
[1, 2, 3, 5]
[2, 1, 3, 5]
[2, 5, 3, 1]
[5, 3, 2, 1]
[1, 3, 5, 2]
第17题:
An exception is thrown at runtime.
int Long
Compilation fails.
Short Long
第18题:
peep
bark
meow
Compilation fails.
An exception is thrown at runtime.
第19题:
Canada
null Canada
Canada null
Canada Canada
Compilation fails due to an error on line 26.
第20题:
The attribute foo is placed in the application
A ServletContextListener registered for that servlet is notified
A ServletAttributeListener registered for that servlet is notified
An HttpSessionAttributeListener registered for that servlet is notified
第21题:
test end
Compilation fails.
test runtime end
test exception end
A Throwable is thrown by main at runtime.
第22题:
B
The code runs with no output.
Compilation fails because of an error in line 12.
Compilation fails because of an error in line 15.
Compilation fails because of an error in line 18.
第23题:
1
12
14
123
Compilation fails.
An exception is thrown at runtime.