if two references are having same hash codes,is that means
those are refering to same object?
Answers were Sorted based on User's Feedback
Answer / aparna
no.they need not b referin 2 same obj.if 2 references
pointng to same obj then also the hascode may same or maynt
same.its totally depends on JVM.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / dheerendra
If two objects are same then on equals obj1.equals(obj2)
return true as well as the hashCode will also be same but if
the hashCode of two objects are same then it is not sure
that objects would point to same reference.
| Is This Answer Correct ? | 2 Yes | 0 No |
what is the messsage u r going to get from an objectoriented programing?
does java support pointers?
What will happen if we cannot mention "finally" in Java Program ???
Can a constructor have different name than a class name in java?
Can Applet have constructors?
What are unchecked exceptions in java?
Are the equals() and hashCode() protected methods of object class?
What is the benefit of singleton pattern?
How you can create a radio buttion using Checkbox class?
What is java basic concept?
What is casting?
Explain the difference between comparator and comparable in java?