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

What are adapter classes?

595


How do you read and print a string in java?

516


Name few java util classes introduced with java 8 ?

491


Which is best ide for java?

511


What are wrapper classes in java?

589






How do you achieve polymorphism in java?

511


Why you should not use singleton?

533


Explain about anonymous inner classes in java?

571


What package is math in java?

528


What is difference between next () and nextline () in java?

530


Is null false in java?

700


What is a local block?

628


why Java does not support multiple inheritances?

695


what is heap memory?

649


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

538