What is the equals() method?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is the equals() method?

Rating:

The equals() method checks if some other object passed to it as an argument is equal to the object on which this method is invoked. The default implementation of the equals() method is in the Object class, the mother of all classes in Java. The equals() method in the Object class checks if two object references refer to the same object, i.e., it checks the referential equality of the two object references. This comparison is also known as shallow comparison.

Other classes in Java provide their own implementation of the equals() method. The classes providing their own implementations of the equals() method perform a deep comparison, i.e., the equals() method in these classes checks if the values of the objects are the same.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.