多项选择题A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class?()

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


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

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.

2.单项选择题

What is the result?()

A.TestA
B.TestB
C.Compilation fails.
D.An exception is thrown at runtime.

3.单项选择题

What is the result?()

A.Compilation succeeds.
B.Exactly one class does NOT compile.
C.Exactly two classes do NOT compile.
D.Exactly four classes do NOT compile.
E.Exactly three classes do NOT compile.

5.单项选择题

Which statement is true about the class of an object that can reference the variable base?()

A.It can be any class.
B.No class has access to base.
C.The class must belong to the geometry package.
D.The class must be a subclass of the class Hypotenuse.

6.单项选择题

What is the result?()

A.Compilation fails because of an error in line 3.
B.Compilation fails because of an error in line 7.
C.Compilation fails because of an error in line 9.
D.If you define D e = new E(),then e.bMethod() invokes the version of bMethod() defined in Line 5.
E.If you define D e = (D)(new E()),then e.bMethod() invokes the version of bMethod() defined in Line 5.
F.If you define D e = (D)(new E()),then e.bMethod() invokes the version of bMethod() defined in Line 9.

7.多项选择题

Which three are valid on line 12?()

A.final
B.static
C.native
D.public
E.private
F.abstract
G.protected

9.多项选择题

Which two methods, inserted independently at line 17, correctly complete the Sales class?()

A.double getSalesAmount() { return 1230.45; }
B.public double getSalesAmount() { return 1230.45; }
C.private double getSalesAmount() { return 1230.45; }
D.protected double getSalesAmount() { return 1230.45; }

10.多项选择题

Which two are true?()

A.The output is mm.
B.The output is mc.
C.Component is-a Meter.
D.Component has-a Meter.
E.DeluxeThingy is-a Component.
F.DeluxeThingy has-a Component.