Which of the following statements are true about the equals()
method? (Choose all that apply.)
equals()
is passed the wrong type, the method should throw an exception.equals()
is passed the wrong type, the method should return false.equals()
is passed the wrong type, the method should return true.B, E.
equals()
should return false when the object it passed in is not equal to the current object.
This includes null and incorrect types.
An equals()
method should have a null check and an instanceof check.