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 functional interface in javatpoint?
Are arrays static in java?
What is boolean example?
How are this() and super() used with constructors in java programming?
What's a method in programming?
What is type conversion in java?
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes....
Can array grow dynamically in java?
what is the diff b/w arraylist and vector?
6 Answers Code Genesis, Genesis, Sprintine Labs,
What is passing parameters in java?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Is list thread safe in java?