Difference between hashCode() & equals()?

Answers were Sorted based on User's Feedback



Difference between hashCode() & equals()?..

Answer / rohan

equals() method of string class compares the contaits of string
equals() method of object class compares the address of objects
Hashcode() method returns the unique identification code of
particular object.

Is This Answer Correct ?    4 Yes 0 No

Difference between hashCode() & equals()?..

Answer / 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

Difference between hashCode() & equals()?..

Answer / 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

More Core Java Interview Questions

What is indexof?

0 Answers  


Is there any limitation of using inheritance?

0 Answers  


what is jms? features of jms

2 Answers   CTS,


What is connection class in java?

0 Answers  


What is string value?

0 Answers  






What is 32 bit float?

0 Answers  


What are the ways to instantiate the class class?

0 Answers  


Which programming language is best in future?

0 Answers  


How can we create a object of a class without using new operator.

1 Answers   Infosys, Nokia,


Can classes declared using the abstract keyword cab be instantiated?

0 Answers   MCN Solutions,


List some features of the abstract class.

0 Answers  


What are the benefits of operations?

0 Answers  


Categories