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 |
how is final different from finally and finalize in java?
What are the java ide’s?
When should you use arraylist and when should you use linkedlist?
What is the file extension for java?
Where can I find jdk in my computer?
I have a sorting issue with a Hashmap. My constraint is that I MUST use the Hashmap and work with existing code. I do a database query and place the results in a Hashmap. When I iterate thru the Hashmap, it loses the original alphabetical sorting done by the database. So, my problem is that I must sort the results coming out of the Hashmap which is then placed into another class.
What is an exception in java?
if i have one string class then how can you achive this class functionality of this class?
What is Java Annotations?
Will minecraft java be discontinued?
What is the default access specifier for variables and methods of a class?
What is difference between “==” and equals()?