单项选择题X 纠错
A.Compilation fails.
B.An exception is thrown at runtime.
C.doStuff x = 6 main x = 6
D.doStuff x = 5 main x = 5
E.doStuff x = 5 main x = 6
你可能喜欢
单项选择题
A.No output is produced.1 2 3
B.No output is produced.2 3 4
C.No output is produced.1 2 3 4
D.An exception is thrown at runtime.1 2 3
单项选择题
A.A class’s finalize() method CANNOT be invoked explicitly.
B.super.finalize() is called implicitly by any overriding finalize() method.
C.The finalize() method for a given object is called no more than once by the garbage collector.
D.The order in which finalize() is called on two objects is based on the order in which the two objects became finalizable.
多项选择题
A.java MainClass if run from the /apps directory
B.java com.company.application.MainClass if run from the /apps directory
C.java -classpath /apps com.company.application.MainClass if run from any directory
D.java -classpath . MainClass if run from the /apps/com/company/application directory
E.java -classpath /apps/com/company/application:. MainClass if run from the /apps directory
单项选择题
A.If the compile is successful, Utils.class is added to the source directory.
B.The compiler returns an invalid flag error.
C.If the compile is successful, Utils.class is added to the classes directory.
D.If the compile is successful, Utils.class is added to the bigProject directory.
单项选择题
A./test/Chess.class
B./home/bob/Chess.class
C./test/games/Chess.class
D./usr/lib/games/Chess.class
E./home/bob/games/Chess.class
单项选择题
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;
单项选择题
A.Compilation fails due to an error in line 23.
B.Compilation fails due to an error in line 29.
C.A ClassCastException occurs in line 29.
D.A ClassCastException occurs in line 31.
E.The value of all four objects prints in natural order.
多项选择题
A.Remove line 14.
B.Replace line 14 with "int i = iter.next();".
C.Replace line 13 with "for (int i : intList) {".
D.Replace line 13 with "for (Iterator iter : intList) {".
E.Replace the method declaration with "sum(List
单项选择题
A.public int compareTo(Object o){/*more code here*/}
B.public int compareTo(Score other){/*more code here*/}
C.public int compare(Score s1,Score s2){/*more code here*/}
D.public int compare(Object o1,Object o2){/*more code here*/}