单项选择题X 纠错
A. The program runs and prints “Hello”
B. An error causes compilation to fail.
C. The program runs and prints “Hello world!”
D. The program runs but aborts with an exception.
你可能喜欢
单项选择题
A. 1
B. 2
C. 3
D. 4
E. 5
单项选择题
A. The program runs and prints nothing.
B. The program runs and prints “Equal”
C. An error at line 5 causes compilation to fail.
D. The program runs but aborts with an exception.
单项选择题
A. Foo has the value of “”
B. Foo has the value of null.
C. Foo has the value of “blue”
D. Foo has the value of “green”
E. An exception is thrown.
F. The code will not compile.
多项选择题
A. Char ch = “a”;
B. Char ch = ‘\’ ‘;
C. Char ch = ‘cafe’;
D. Char ch = “cafe”;
E. Char ch = ‘\ucafe’;
F. Char ch = ‘\u10100’;
G. Char ch = (char) true;
单项选择题
A. The code compiles and “s=” is printed.
B. The code compiles and “s=null” is printed.
C. The code does not compile because string s is not initialized.
D. The code does not compile because string s cannot be referenced.
E. The code compiles, but a NullPointerException is thrown when toString is called.
多项选择题
A. Final int k = 4;
B. Public int k = 4;
C. Static int k = 4;
D. Private int k = 4;
E. Abstract int k = 4;
F. Volatile int k = 4;
单项选择题
A. Foo has the value “”
B. Foo has the value null
C. An exception is thrown
D. The code will not compile
单项选择题
A. Java Test 2222
B. Java Test 1 2 3 4
C. Java Test 4 2 4 2
D. Java Test 4 3 2 1
单项选择题
A. Compilation will succeed.
B. Compilation will fail at line 5.
C. Compilation will fail at line 6.
D. Compilation will fail at line 14.
E. Compilation will fail at line 17.
单项选择题
A. 4, 4
B. 4, 5
C. 5, 4
D. 5, 5
E. The code will not compile.