See the following equals method defined in class BankAccount.
class BankAccount(){
String accNumber;
int accType;
public boolean equals (Object obj){
if(obj instanceOf BankAccount){
BankAccount b = (BankAccount) obje;
return(acctumber.equals(b.accNumber) && accType == b.accType);
}
return false;
}
}
Does this method violates the contract for the equals method?
Select one of the following: