Difference between hashCode() & equals()?

Answer Posted / srikanth

hashCode() method returns integer no assigned by jvm
ie ...it is for identifying objects in heap memory very
fastly

equals() it is for comparing addreess of objects

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isn’t there operator overloading?

800


What is a finally block? Is there a case when finally will not execute?

736


What is java and why do we need it? Explain

790


What is classname class in java?

745


How do you override a method?

730


Why collection is called framework in java?

715


What are the types of collections in java?

769


What is the role of the java.rmi.naming class?

711


How do you write a scanner class in java?

754


What is integer parseint?

721


How to split arraylist elements in java?

828


Why Java doesn’t support multiple inheritance?

807


Does sprintf allocate memory?

809


What is package private scope in java?

707


What is difference between fileinputstream and filereader in java?

761