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 |
Can there be an abstract method without an abstract class?
Which keyword specify that a variable is effectively final ?
What is a prefix function.write down a code to compute prefix function.
why java does not contain pointers?
What is the use of http-tunneling in rmi?
Write a program for recursive Traverse?
How many bits is a string in java?
Give the difference between the println method and sqrt method?
What is the difference between C++ and Java and your preferences?
How long will it take to learn java?
How hashmap increases its size in java?
What Is Resource Leak?