Is there any magic hanging around anywhere that could mean that
(object0 == object1) != (object0.equals(object1))
where object0 and object1 are both of a certain type which hasn’t overridden Object.equals()?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. That’s exactly the definition of Object.equals().
…this method returns true if and only if x and y refer to the same object (x == y has the value true) …