2
3
12
23
123
Compilation fails.
An exception is thrown at runtime.
第1题:
System.out.println(Math.sqrt(-4D)); What is the result?()
第2题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
第3题:
Compilation fails.
An exception is thrown at runtime.
The code executes normally and prints "sleep".
The code executes normally, but nothing is printed.
第4题:
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.
第5题:
TestA
TestB
Compilation fails.
An exception is thrown at runtime.
第6题:
An exception is thrown at runtime.
r, e, o,
Compilation fails.
r, t, t,
第7题:
w-f
f-p w-f
w-f b-f
f-p w-f b-f
Compilation fails.
An exception is thrown at runtime.
第8题:
–2
NaN
Infinity
Compilation fails.
An exception is thrown at runtime.
第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题:
1
12
14
123
Compilation fails.
An exception is thrown at runtime.
第12题:
1
2
12
Compilation fails.
No output is produced.
An exception is thrown at runtime.
第13题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第14题:
42
420
462
42042
Compilation fails.
An exception is thrown at runtime.
第15题:
test
null
An exception is thrown at runtime.
Compilation fails because of an error in line 1.
Compilation fails because of an error in line 4.
Compilation fails because of an error in line 5.
第16题:
Compilation fails.
ClassC is displayed.
The code runs with no output.
An exception is thrown at runtime.
第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题:
Compilation fails.
aAaA aAa AAaa AaA
AAaa AaA aAa aAaA
AaA AAaa aAaA aAa
aAa AaA aAaA AAaa
An exception is thrown at runtime.
第20题:
X, followed by an Exception.
No output, and an Exception is thrown.
Compilation fails due to an error on line 14.
Compilation fails due to an error on line 16.
Compilation fails due to an error on line 17.
第21题:
test end
Compilation fails.
test runtime end
test exception end
A Throwable is thrown by main at runtime.
第22题:
00
0001
000120
00012021
Compilation fails.
An exception is thrown at runtime.
第23题:
Hello
Hello World
Compilation fails.
Hello World 5
The code runs with no output.
An exception is thrown at runtime.