public boolean equals(Object obj) {
System.out.println("Student's EQUALS ");
Student stu = (Student) obj;
System.out.println(this.name + "and" + stu.name + "compare");
//return this.id.equals(stu.id) && this.name.equals(stu.name);
return this.id ==stu.id && this.name.equals(stu.name);
}
为什么注释里的是错误的 |
|