I read the JavaDoc for the method Object.hashCode, it says that
As reasonably practical, the hashCode method defined by the Object class returns different integers for different objects. (Usually this is done by converting the internal address of the object to an integer [...])
But whatever its implementation, the method hashCodealways returns an integer (let it be assumed positive), so the given Integer.MAX+1different objects, two of them will have the same hash code.
Why is the JavaDoc "denied" collision here? This is a practical conclusion, given that the internal address is used and "come on, you will never have objects at Integer.MAX+1once, so we can say that it is almost always unique"?
EDIT
This bug entry (thanks to Sleiman Jneidi ) gives an exact idea (I think this is more than a 10 year discussion):
it seems that many, perhaps most programmers, think that the default implementation and therefore System.identityHashCode will create unique hash codes.
The βHow reasonable is practicalβ qualification is not enough in practice to clearly show that hash codes are not different in practice.