TestA
TestB
Compilation fails.
An exception is thrown at runtime.
单选题public class Test { private static float[] f = new float[2]; public static void main(String args[]) { System.out.println(“f[0] = “ + f[0]); } } What is the result?()Af[0] = 0Bf[0] = 0.0CCompilation fails.DAn exception is thrown at runtime.
点击查看答案
单选题Given: What is the result?()Ar, t, t,Br, e, o,CCompilation fails.DAn exception is thrown at runtime.
单选题Given: What is the result?()A2B3C12D23E123FCompilation fails.GAn exception is thrown at runtime.
单选题Given: What is the output?()A42B420C462D42042ECompilation fails.FAn exception is thrown at runtime.
单选题Given: What is the result?()ABBB, followed by an Exception.CCompilation fails due to an error on line 9.DCompilation fails due to an error on line 14.EAn Exception is thrown with no other output.
单选题Click the Exhibit button. Given: ClassA a = new ClassA( ); a.methodA( ); What is the result? ()ACompilation fails.BClassC is displayed.CThe code runs with no output.DAn exception is thrown at runtime.
单选题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?()ABaseBBaseBaseCCompilation fails.DThe code runs with no output.EAn exception is thrown at runtime.