java接口
//接口
public interface Comparable{
int compareTo(Object other);
}
//实现
class Employee implements Comparable<Employee>{
public int compareTo(Employee other){
if(salary < other.salary) return -1;
if(salary > other.salary) return 1;
return 0
}
}
每个抽象类只能扩展一个类