单项选择题
Given:
And the following five fragments:
public static void main(String...a) {
public static void main(String.* a) {
public static void main(String... a) {
public static void main(String[]... a) {
public static void main(String...[] a) {
How many of the code fragments, inserted independently at line 2, compile?()
A.0
B.1
C.2
D.3
E.4
相关考题
-
单项选择题
Click the Exhibit button. What is the result?()
A.4321
B.0000
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 18. -
单项选择题
Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?()
A.Compilation will succeed for all classes and interfaces.
B.Compilation of class C will fail because of an error in line 2.
C.Compilation of class C will fail because of an error in line 6.
D.Compilation of class AImpl will fail because of an error in line 2. -
单项选择题
Given: Which code, inserted at line 14, allows the Sprite class to compile?()
A.Direction d = NORTH;
B.Nav.Direction d = NORTH;
C.Direction d = Direction.NORTH;
D.Nav.Direction d = Nav.Direction.NORTH;
