单项选择题X 纠错
A.Compilation of class A fails.
B.Line 28 prints the value 3 to System.out.
C.Line 28 prints the value 1 to System.out.
D.A runtime error occurs when line 25 executes.
E.Compilation fails because of an error on line 28.
你可能喜欢
单项选择题
A.Point p = new Point();
B.Line.Point p = new Line.Point();
C.The Point class cannot be instatiated at line 15.
D.Line l = new Line(); l.Point p = new l.Point();
单项选择题
A.Mr. John Doe
B.An exception is thrown at runtime.
C.Compilation fails because of an error in line 12.
D.Compilation fails because of an error in line 15.
E.Compilation fails because of an error in line 20.
单项选择题
A.Foo{public int bar(){return 1;}}
B.new Foo{public int bar(){return 1;}}
C.new Foo(){public int bar(){return 1;}}
D.new class Foo{public int bar(){return 1;}}
多项选择题
A.A
B.B
C.C
D.D
单项选择题
A.12,4
B.The code runs with no output.
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 21.
E.Compilation fails because of an error in line 22.
F.Compilation fails because of an error in line 31.
单项选择题
A.0
B.1
C.2
D.3
E.4
F.6
单项选择题
Which code should be inserted at line 1 of Demo.java to compile and run Demo toprint "pizzapizza"?()
A.import utils.*;
B.static import utils.*;
C.import utils.Repetition.*;
D.static import utils.Repetition.*;
E.import utils.Repetition.twice();
F.import static utils.Repetition.twice;
G.static import utils.Repetition.twice;
单项选择题
A.test
B.null
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 1.
E.Compilation fails because of an error in line 4.
F.Compilation fails because of an error in line 5.
单项选择题
A.Direction d = NORTH;
B.Nav.Direction d = NORTH;
C.Direction d = Direction.NORTH;
D.Nav.Direction d = Nav.Direction.NORTH;
单项选择题
A.java Commander
B.java com.sun.sjcp.Commander
C.java com/sun/sjcp/Commander
D.java -cp com.sun.sjcp Commander
E.java -cp com/sun/sjcp Commander