This is a scjp mock exam question.
Suppose I have the following two files:
package pkg;
public class Kit {
public String glueIt (String a, String b) {return a+b;}
}
import pkg.*;
class UseKit {
public static void main(String[]args) {
String s = new Kit().glueIt(args[1],args[2]);
System.out.println(s);
}
}
And the following directory structure:
test
|--UseKit.class
|
com
|--KitJar.jar
The current directory is test
and the file pkg/Kit.class
is in KitJar.jar
According to the answer, the java invocation that produces the output b c is
java -classpath com/KitJar.jar:. UseKit a b c
Please explain the use of the operators ":" and "."