@Override
public boolean contains(Object o) {
if ((this.name).equals((String) o)) {
return true;
}
else {
return false;
}
}
I get the error: The method contains(Object) of type Team must override or implement a supertype method
The error means there is “no method to override”. Your super-class or interface doesn’t have a method
boolean contains(Object o)which the specified method can override.