S
stonesll
Unregistered / Unconfirmed
GUEST, unregistred user!
我定义了一个包,想在其它应用程序中引用,怎么总不成功?
例如:先定义包:
package c08;
interface Compare {
boolean lessThan(Object lhs,Object rhs);
boolean lessThanOrEqual(Object lhs,Object rhs);
}
编译生成Compare.java
然后引用:
package c08;
import java.util.*;
public class SortVector extends Vector{
private Compare compare;
public SortVector(Compare comp) {
compare = comp;
}
。。。。。
}
怎么Compare总是不存在得类?
例如:先定义包:
package c08;
interface Compare {
boolean lessThan(Object lhs,Object rhs);
boolean lessThanOrEqual(Object lhs,Object rhs);
}
编译生成Compare.java
然后引用:
package c08;
import java.util.*;
public class SortVector extends Vector{
private Compare compare;
public SortVector(Compare comp) {
compare = comp;
}
。。。。。
}
怎么Compare总是不存在得类?