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)- A83% (44)
- B2% (1)
- C4% (2)
- D11% (6)
Community Discussion
No community discussion yet for this question.