单项选择题X 纠错
A. An exception is thrown.
B. The code will not compile.
C. The program prints “null”
D. The program prints “blue”
E. The program prints “green”
你可能喜欢
单项选择题
A. Java.io.InputStream.
B. Java.io.EncodedReader.
C. Java.io.InputStreamReader.
D. Java.io.InputStreamWriter.
E. Java.io.BufferedInputStream.
单项选择题
A. New dataInputStream(“in.txt”);
B. New dataInputStream(new file(“in.txt”));
C. New dataInputStream(new writer(“in.txt”));
D. New dataInputStream(new FileWriter(“in.txt”));
E. New dataInputStream(new InputStream(“in.txt”));
F. New dataInputStream(new FileInputStream(“in.txt”));
单项选择题
A. An exception is thrown.
B. The program exists without printing anything.
C. An error at line 1 causes compilation to fail.
D. An error at line 6 causes the compilation to fail.
E. “Running” is printed and the program exits.
多项选择题
A. Exiting from a synchronized block.
B. Calling the wait method on an object.
C. Calling the notify method on an object.
D. Calling the notifyAll method on an object.
E. Calling the setPriority method on a thread object.
单项选择题
A. The program runs and prints “i=1, j=0”
B. The program runs and prints “i=1, j=4”
C. The program runs and prints “i=3, j=4”
D. The program runs and prints “i=3, j=0”
E. An error at line 4 causes compilation to fail.
F. An error at line 7 causes compilation to fail.
多项选择题
A. Error
B. Event
C. Object
D. Exception
E. Throwable
F. RuntimeException
单项选择题
A. Value = 3
B. Value = 4
C. Value = 5
D. Value = 6
E. Value = 7
F. Value = 8
单项选择题
A. Throws Exception.
B. Catch (Exception e).
C. Throws RuntimeException.
D. Catch (TestException e).
E. No code is necessary.
多项选择题
A. int ia = new int [15];
B. float fa = new float [20];
C. char ca = “Some String”;
D. Object oa = new float[20];
E. Int ia = (4, 5, 6) (1, 2, 3)
单项选择题
A. Compilation will fail.
B. Compilation will succeed and the program will print “3”
C. Compilation will succeed but the program will throw a ClassCastException at line 6.
D. Compilation will succeed but the program will throw a ClassCastException at line 7.