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 |
If there are two notepad opened and working on it . is this a process or thread? computer based Live Example to differentiate between Thread , Process , and Multi tasking ?
explain the concept of inheritance with an example?
How java is platform independent?
41 Answers College School Exams Tests, Infosys, TCS,
what modifiers are used with top-level class?
Which method returns the length of a string?
What is complexity and its types?
What is a local class in java?
Explain about instanceof operator in java?
State the significance of public, private, protected class?
how we can make a read-only class in java?
What is meant by inheritance and what are its advantages?
What do the thread?class methods run() and start() do?