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 an array and a vector? How they different from each other?
Why Java is a platform independent language?
What is sorting algorithm in java?
What is entry set in java?
What are the advantages of assembly language?
Is multiple inheritance allowed in Java? Why ?
Why chararray() is preferred over string to store the password?
What is exception hierarchy in java?
How many types of threads are there in java?
what is the use of custom tags? with example?
What is int short for?
What do the thread?class methods run() and start() do?