00
0001
000120
00012021
Compilation fails.
An exception is thrown at runtime.
第1题:
String a = “ABCD”; String b = a.toLowerCase(); b.replace(‘a’, ‘d’); b.replace(‘b’, ‘c’); System.out.println(b); What is the result? ()
第2题:
public class Test { public static void main(String [] args) { System.out.println(args.length > 4 && args[4].equals(“-d”)); } } If the program is invoked using the command line: java Test One Two Three –d What is the result?()
第3题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
第4题:
42
420
462
42042
Compilation fails.
An exception is thrown at runtime.
第5题:
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.
第6题:
TestA
TestB
Compilation fails.
An exception is thrown at runtime.
第7题:
An exception is thrown at runtime.
int Long
Compilation fails.
Short Long
第8题:
peep
bark
meow
Compilation fails.
An exception is thrown at runtime.
第9题:
6
7
10
11
Compilation fails.
An exception is thrown at runtime.
第10题:
Afoo Afoo
Afoo Bfoo
Bfoo Afoo
Bfoo Bfoo
Compilation fails.
An exception is thrown at runtime.
第11题:
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.
第12题:
1
12
14
123
Compilation fails.
An exception is thrown at runtime.
第13题:
public static void main(String[] args) { for (int i=0;i<= 10;i++){ if( i>6) break; } System.out.println(i); } What is the result?()
第14题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第15题:
2
3
12
23
123
Compilation fails.
An exception is thrown at runtime.
第16题:
true
false
Compilation fails.
An exception is thrown at runtime.
第17题:
Compilation fails.
ClassC is displayed.
The code runs with no output.
An exception is thrown at runtime.
第18题:
abcd
ABCD
dccd
dcba
Compilation fails.
An exception is thrown at runtime.
第19题:
An exception is thrown at runtime.
r, e, o,
Compilation fails.
r, t, t,
第20题:
w-f
f-p w-f
w-f b-f
f-p w-f b-f
Compilation fails.
An exception is thrown at runtime.
第21题:
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
第22题:
test end
Compilation fails.
test runtime end
test exception end
A Throwable is thrown by main at runtime.
第23题:
00
0001
000120
00012021
Compilation fails.
An exception is thrown at runtime.
第24题:
Hello
Hello World
Compilation fails.
Hello World 5
The code runs with no output.
An exception is thrown at runtime.