5. Given the default classpath:
/foo
And this directory structure:
foo
|
test |
xcom
|--A.class
|--B.java
And these two files:
package xcom;
public class A { }
package xcom;
public class B extends A { }
Which allows B.java to compile? (Choose all that apply.)
A. Set the current directory to xcom then invoke
javac B.java
B. Set the current directory to xcom then invoke
javac -classpath . B.java
C. Set the current directory to test then invoke
javac -classpath . xcom/B.java
D. Set the current directory to test then invoke
javac -classpath xcom B.java
E. Set the current directory to test then invoke
javac -classpath xcom:. B.java
Correct answer is "C" but how come AFTER SETTING DIRECTORY TO TEST WE CAN SEARCH A.CLASS ??? THE CLASSPATH IS CURRENT DIRECTORY MEANS "TEST DIRECTORY" BUT THE A.CLASS is PRESENT IN XCOM ........
I AM CONFUSED !!!