// 重写hashcode方法
@Override
public int hashCode() {
int result = name.hashCode();
result = 17 * result + sex.hashCode();
result = 17 * result + age.hashCode();
return result;
}
// 重写hashcode方法 @Override public int hashCode() { int result = name.hashCode(); result = 17 * result + sex.hashCode(); result = 17 * result + age.hashCode(); return result; } // 重写equals方法 @Override public boolean equals(Object obj) { .