collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第1题:
public class Test { public enum Dogs {collie, harrier}; public static void main(String [] args) { Dogs myDog = Dogs.collie; switch (myDog) { case collie: System.out.print(”collie “); case harrier: System.out.print(”harrier “); } } } What is the result?()
第2题:
f[0] = 0
f[0] = 0.0
Compilation fails.
An exception is thrown at runtime.
第3题:
2
3
12
23
123
Compilation fails.
An exception is thrown at runtime.
第4题:
Compilation fails.
ClassC is displayed.
The code runs with no output.
An exception is thrown at runtime.
第5题:
Base
BaseBase
Compilation fails.
The code runs with no output.
An exception is thrown at runtime.
第6题:
An exception is thrown at runtime.
int Long
Compilation fails.
Short Long
第7题:
peep
bark
meow
Compilation fails.
An exception is thrown at runtime.
第8题:
harrier
shepherd
retriever
Compilation fails.
retriever harrier
An exception is thrown at runtime.
第9题:
Afoo Afoo
Afoo Bfoo
Bfoo Afoo
Bfoo Bfoo
Compilation fails.
An exception is thrown at runtime.
第10题:
00
0001
000120
00012021
Compilation fails.
An exception is thrown at runtime.
第11题:
collie
harrier
Compilation fails.
collie harrier
An exception is thrown at runtime.
第12题:
1
2
12
Compilation fails.
No output is produced.
An exception is thrown at runtime.
第13题:
class Base { Base() { System.out.print(“Base”); } } public class Alpha extends Base { public static void main( String[] args ) { new Alpha(); new Base(); } } What is the result?()
第14题:
r, t, t,
r, e, o,
Compilation fails.
An exception is thrown at runtime.
第15题:
42
420
462
42042
Compilation fails.
An exception is thrown at runtime.
第16题:
TestA
TestB
Compilation fails.
An exception is thrown at runtime.
第17题:
A new Item object is created with the preferred value in the id attribute.
The attribute id in the Item object is modified to the new value.
Compilation fails.
An exception is thrown at runtime.
The attribute id in the Item object remains unchanged.
第18题:
An exception is thrown at runtime.
r, e, o,
Compilation fails.
r, t, t,
第19题:
w-f
f-p w-f
w-f b-f
f-p w-f b-f
Compilation fails.
An exception is thrown at runtime.
第20题:
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
第21题:
test end
Compilation fails.
test runtime end
test exception end
A Throwable is thrown by main at runtime.
第22题:
1
12
14
123
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.