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 ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about java sdk?

788


Explain the JDB in depth & command line.

770


Does treeset allow null in java?

699


Explain the reason behind ending a program with a system.exit(0)?

790


What is a Presistent Object?

910


How are variables stored in memory?

799


What does the “static” keyword mean?

801


What is the static field modifier?

795


Explain wrapper classes in java?

749


Can we declare a class as abstract without having any abstract method?

754


What is the difference between a method and a function in alice?

793


What are the library functions in java?

769


What is the structure of java?

740


What are abstract methods in java?

870


Explain about static nested classes in java?

805