Given: and two separate command line invocations: java Yippee java Yippee 1 2 3 4 What is the result?()
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
单项选择题Given: What is the result?()
A.81 B.82 C.91 D.92
单项选择题Whichstatementistrue?()
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.
多项选择题Given: And MainClass exists in the apps com company application directory. Assume the CLASSPATH environment variable is set to . (current directory). Which two java commands entered at the commandline will run MainClass?()
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
单项选择题Given the following directory structure: bigProject |--source ||--Utils.java| |--classes |-- And the following command line invocation: javac -d classes source Utils.java Assume the current directory is bigProject,what is the result?()
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 UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where theold one is installed. Bob is currently able to run a Java chess program starting from his home directory home bob using the command: java -classpath test: home bob downloads *.jar games.Chess Bob’s CLASSPATH is set (at login time) to: usr lib: home bob classes: opt java lib: opt java lib *.jar What is a possible location for the Chess.class file?()
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