This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
For me the only correct answer is C, and MasterExam claims that correct answers are C and D. For me answer D is wrong, cause we can imagine the situation where we have two SortOf objects with the following instance variables values:
Given the equals method from D answer both object are considered equal, cause 2*3*4=2*4*3, but theirs hashCode differs cause 2*3 != 2*4, so the contract is not fulfilled. Is it rather obvious mistake in MasterExam or somehow i get it wrong?