What if in java I override "equals()" but not hashCode()? : <p>[Core java programming] says if I overrides Object.equals(), then I should override Object.hashCode() at the same time.</p>

<p>This is quite odd to me, if I don't override hashCode() at the same time, is there any possibility that something wrong could happen in logic?</p>

<p>Would you help to give such an example to indicate?</p>

<p>Thanks a lot.</p>
