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 are the different ways of implementing thread? Which one is more advantageous?
What is singleton class?
16 Answers 3i Infotech, 7 Seas, ABC, Amdocs, Cap Gemini, Oracle, Persistent, TCS, Techforza,
How do you add spaces in java?
What does I ++ mean?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
Write the algorithm to check the number non-leaf nodes in a tree.
What is the purpose of the wait(), notify(), and notifyall() methods in java programming?
What is procedure writing?
What are abstract methods in java?
What will happen if a thrown exception is not handled?
0 Answers ABB, Akamai Technologies, Infogain,
How will you call an Applet using Java Script Function?
What is a Presistent Object?
0 Answers InfoAxon Technologies,