WHAT DOES THE HASHCODE() METHOD?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 616  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    What does the hashCode() method?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!