Home > DeveloperSection > Interviews > What does the hashCode() method?

Posted on    May-13-2015 11:23 PM

 Java Java  Collection 
 1 Answer(s)
  399  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    May-13-2015 11:23 PM

The hashCode() method returns a hash code value (an integer number).

The hashCode() method returns the same integer number, if two keys (by calling equals() method) are same.

But, it is possible that two hash code numbers can have different or same keys.

Don't want to miss updates? Please click the below button!

Follow MindStick