• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpath question

 
Felix Tang
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q37 of the diagnostic test:

You want to execute a class named My.class in the package whiz.utilities.myapp. The path to that directory is

/java/MyPackages/whiz/utilities/myapp

Which command would you use to run the class?

A. java -classpath . /java/MyPackages/whiz/utilities/myapp My
B. java -classpath /java/MyPackages whiz.utilities.myapp.My
C. java -classpath . java.MyPackages.whiz.utilities.myapp.My
D. java -classpath ./java/MyPackages/whiz/utilities/myapp/My

Am I right to say the answer is B? You can't have a dot without the separator colon( right after it.
 
Milind Patil
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Answer B is correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic