单项选择题
Given classes defined in two different files:
What is the result of executing XMLMessage.main?()
A.text
B.Compilation fails.
C.<msg>text</msg>
D.An exception is thrown at runtime.
相关考题
-
多项选择题
AdeveloperiscreatingaclassBook,thatneedstoaccessclassPaper.ThePaperclassisdeployedinaJARnamedmyLib.jar.Whichthree,takenindependently,willallowthedevelopertousethePaperclasswhilecompilingtheBookclass?()
A.The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar
B.The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar
C.The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class
D.The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar
E.The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac –cp /foo/myLib.jar/Paper Book.java
F.The JAR file is located at foo/myLib.jar and the Book class is compiled using javac –classpath /foo/myLib.jar Book.java -
单项选择题
What is the result?()
A.1,2,3
B.Compilation fails because of an error in line 12.
C.Compilation fails because of an error in line 13.
D.Compilation fails because of an error in line 14.
E.A ClassCastException is thrown at runtime. -
单项选择题
What is the result?()
A.TestA
B.TestB
C.Compilation fails.
D.An exception is thrown at runtime.
