java中,方法可以访问他的类对象的任何私有特性 读一本书(Core Java for the Impatient)时,发现这个注意,以前的时候没有在意,今天仔细想想发现记忆不深刻.记录一下 下面代码实现了Comparable接口 public class Employee implements Comparable<Employee> { private double salary; @Override public int compareTo(Employee o) { // TODO A…