胃疼的,是一样代码又还是不行
@Override
public boolean equals(Object obj){
if(this == obj){
return true;
}
if(obj == null){
return false;
}
if(!(obj instanceof Course)){
return false;
Course course = (Course)obj;
if(this.name == null){
return true;
}else
return false;
}else{
if(this.name.equals(course.name)){
return true;
}else
return false;
}
}