Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

Equals() and Hashcode()

Ads

 
 

Share on Google+Share on Google+

venkatesh
Equals() and Hashcode()
2 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

August 29, 2009 at 5:51 PM


Hi Friend,

The methods Equals and HashCode() are the methods of Object class.

The Equals() method returns boolean values checks whether the two objects are equal or not.
The HashCode() returns the hash code value for the object.

Using these methods,an object can be used to store and retrieve from the hash table,hash map or hash set.

Thanks


August 29, 2009 at 11:10 PM


can you give one hashtable prog using equals() and hashcode()?PLease..thanks in advance

Ads









Related Tutorials/Questions & Answers: