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 ide should I use for java?
What comes to mind when someone mentions a shallow copy in java?
What are byte codes?
In the HashMap, we know the values but we dont know the key, then how can we get the key from HashMap ?????
Explain the difference between abstract class and interface in java?
what is an object class?Explain its methods?
How do you declare a destructor in java?
Explain the difference between private, public, package and protected in java?
Difference between interface and abstract class with ex.
4 Answers Cognizant, Tech Mahindra,
What do you mean by singleton class in java?
How do you decide when to use arraylist and linkedlist?
Tell me are there implementations for sorting and searching in the java libarary?