If a.equals(b) returns true, b instanceof class_of_a should always be true.
the correct answer was false for the question.
I understand the explaination that anyone can implement equals in a strange way so it's not always true but proper implementation would test instanceof....so it SHOULD equal true.
I would have answered false if the question used the word MUST instead of SHOULD.
- Site Admin
- Posts: 8958
- Joined: Fri Sep 10, 2010 9:26 pm
thank a lot for your feedback.
Users browsing this forum: No registered users and 2 guests