There are only two things in your question.
First, that returns System.identityHashCode (Object).
Returns the same hash code for this object, which will be returned by the hashCode () method by default, regardless of whether the given object class overrides hashCode (). The hash code for the null reference is zero.
Secondly, what is a hashcode rule when comparing the equality of two objects.
The contract says that if two objects are equal using the equals (object) method, then they must have the same hash code, but if two objects have the same hash code, they are not necessarily equal.
source share