public class Employee{ /* *显示参数为Employee,其结果没有覆盖Object的equals方法,而是定义了一个新的方法 */ public boolean equals(Employee other){ return name.equals(other.name)&&salary==other.salary&&hireDay.equals(other.hireDay); } }