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 |
Explain the difference between a Thread and a Process.
How GUI component handle its own events?
Explain the difference between collection api and stream api in java8?
Is arraylist a class in java?
Explain the hierarchy of java exception classes?
what is meant wrapper classes?
why java does not contain pointers?
Difference between this(), super()?
12 Answers College School Exams Tests, Oracle,
What is a conditional equation?
when to for abstract class and when to go for interface
What is difference between hashset and hashmap?
Why can't we make jsp as a controller and action servlet in struts?