单项选择题
Click the Exhibit button. Given: ClassA a = new ClassA(); a.methodA(); What is the result? ()
A.Compilation fails.
B.ClassC is displayed.
C.The code runs with no output.
D.An exception is thrown at runtime.
点击查看答案
相关考题
-
单项选择题
Given: What is the result?()
A.harrier
B.shepherd
C.retriever
D.Compilation fails.
E.retriever harrier
F.An exception is thrown at runtime. -
单项选择题
Given: If some sort of exception is thrown at line 34, which output is possible?()
A.a
B.b
C.c
D.ac
E.abc -
单项选择题
Given: Which code, inserted at line 16, will cause a java.lang.ClassCastException?()
A.Alpha a = x;
B.Foo f = (Delta)x;
C.Foo f = (Alpha)x;
D.Beta b = (Beta)(Alpha)x;
