Difference between hashCode() & equals()?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is indexof?
Is there any limitation of using inheritance?
what is jms? features of jms
What is connection class in java?
What is string value?
What is 32 bit float?
What are the ways to instantiate the class class?
Which programming language is best in future?
How can we create a object of a class without using new operator.
Can classes declared using the abstract keyword cab be instantiated?
List some features of the abstract class.
What are the benefits of operations?