Hi, well i am unable to understand that why it is mandatory
to have same hashcode, if two objects are same?

Thanks in advance.

Answer Posted / prasanna

If two objects are equal then there hashcode must same.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does finally block differ from finalize() method?

826


What is the difference between a constructor and a method?

877


How are the elements of a gridbaglayout organized in java programming?

751


What is a predicate method?

761


How many types of gc are there in java?

764


How to create a fecelet view?

786


What is a class in java?

803


Explain the difference between an object-oriented programming language and object-based programming language?

777


Why deletion in linkedlist is fast than arraylist?

786


What are three ways in which a thread can enter the waiting state in java programming?

923


What is a protected class in java?

771


Name some OOPS Concepts in Java?

843


What is volatile data type?

748


What is data string?

701


Are arrays immutable in java?

761