nerdexam
GIAC

GSSP-JAVA · Question #236

Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the Test.jar file in the directory /practice. How would you compile your code?

The correct answer is A. javac -classpath /practice/Test.jar Practice.java. See the full explanation below for the reasoning.

Question

Mark writes a class Practice.java. This class needs to access the com.bar.Test class that is stored in the Test.jar file in the directory /practice. How would you compile your code?

Options

  • Ajavac -classpath /practice/Test.jar Practice.java
  • Bjavac -classpath /practice/ Practice.java
  • Cjavac -classpath /practice/Test.jar/com/bar Practice.java
  • Djavac -classpath /practice Practice.java

How the community answered

(53 responses)
  • A
    83% (44)
  • B
    2% (1)
  • C
    4% (2)
  • D
    11% (6)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice