Monday, August 24, 2015

Hashcode in java

What is the use of hashcode in java.
Hashcode is very important in java . in object class , you will have a method hashcode , which will give the hashcode of an object.

hashcode is used to check whether two objects are equal or not . If two objects have a different hashcode they are definately not equal , but if their hashcode is same ,it does not guarantee both objects to be same .

No comments:

Post a Comment

ec2-user@ec2 Permission denied