About Question com.enthuware.ets.scjp.v6.2.532 :
Posted: Wed Jan 05, 2011 8:02 pm
the question:
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.
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.