重写了equal后name还是提示false 怎么回事
public void containsValueTest(){
System.out.println("请输入要确认的学生姓名:");
String name=scan.next();
Student student=new Student(null,name);
System.out.println("students中是否包含 "+name+" "+"学生"+students.containsValue(student));
if(!students.containsValue(student)){
System.out.println("学生映射表中不包含该学生");
}else{
for(Entry<String,Student> entry:students.entrySet()){
if((entry.getValue().getName()).equals(student.getName()))
System.out.println("对应的ID:"+entry.getKey());
}
}
}