File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

javac question

Raphael Kou
Greenhorn

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


Given deault classpath:
/foo

Directory structure:
foo
|
test
|
xcom
|--A.class
|--B.java

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/B.java

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

Why is this answer false?
dolly shah
Ranch Hand

Joined: Jun 18, 2007
Posts: 383
here

May be this link will help you.


SCJP-1.5<br />SCWCD-1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javac question