@Override public String toString(){ return"Student [no=" + no + ", name=" + name + "]"; }
@Override publicinthashCode(){ finalint prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + no; return result; }
@Override publicbooleanequals(Object obj){ if (this == obj) returntrue; if (obj == null) returnfalse; if (getClass() != obj.getClass()) returnfalse; Student other = (Student) obj; if (name == null) { if (other.name != null) returnfalse; } elseif (!name.equals(other.name)) returnfalse; if (no != other.no) returnfalse; returntrue; } }