Tag Archives: What is hashcode

What is the Contract between equals and hashCode method?

What is the Contract between equals and hashCode method

What is the Contract between equals and hashCode method If two objects are equals by .equals() then their hashCode must be equals. That is two equivalent object should have the same hashCode that is if r1.equals(r2) is true then r1.hashcode==r2.hashcode is always true. Object class .equals() method and hashCode() method follows above contract hence whenever we are overriding .equals() method ...

Read More »

Responsive WordPress Theme Freetheme wordpress magazine responsive freetheme wordpress news responsive freeWORDPRESS PLUGIN PREMIUM FREEDownload theme free