if two references are having same hash codes,is that means
those are refering to same object?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between static and dynamic binding in java?

540


How infinite loop is declared?

533


Can an interface implement another interface?

570


What is the synonym of string?

531


What is keyword auto for?

637






What is java objectoutputstream?

541


What is meant by distributed application? Why are we using that in our application?

545


Why does java have different data types for integers and floating-point values?

529


How can a gui component handle its own events in java programming?

527


What is contract between hashcode and equal method?

566


How would you convert bytes to string?

560


What are the data types supported by java? What is autoboxing and unboxing?

546


What is the private method modifier?

575


What do you mean by boolean?

573


What is static import in java?

527