carox kaur wrote:But where is the prob if unequal objects will hash to same buckets???
The only "problem" is performance. A hash map / set would have to look through more items to find the truly equal object. Other than that, no problem. In fact, it is perfectly legal to return a constant (like 42) as the hash code - but then your hash map / set turns into a linked list instead.