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 |
Can we overload destructor in java?
what is the significance of listiterator in java?
What are desktop procedures?
What is the difference between Object and Instance?
What is computer compiler?
Can we declare Pointer in Java?
where do you place after you did code in java
Can a class be subclass of itself?
Can the interface be final?
What are the common uses of "this" keyword in java ?
What is the difference between a switch statement and an if statement?
Can an integer be a string?