File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes javac question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "javac question" Watch "javac question" New topic

javac question

Raphael Kou

Joined: Oct 23, 2007
Posts: 13
K&B Book Chapter 10 Question 5

Given deault classpath:

Directory structure:

And these two files:

package xcom;
public class A {}

package xam
public class B extends A { }

So the only right answer is:
Set the current directory to "test" then invoke
javac -classpath . xcom/

But this answer looks also right for me:
Set the current directory to "xcom" then invoke
javac -classpath .

Why is this answer false?
dolly shah
Ranch Hand

Joined: Jun 18, 2007
Posts: 383

May be this link will help you.

SCJP-1.5<br />SCWCD-1.4
I agree. Here's the link:
subject: javac question
jQuery in Action, 3rd edition