What are uses of Hash Code?

Answers were Sorted based on User's Feedback



What are uses of Hash Code?..

Answer / suraj kumar

1. When equals() method is invoked on java objects to check
their equality, then the hash code of objects are checked. The
two objects having same hash code are equal.
2. The objects having distinct hash code in HashTable
increases the performance of HashTable. Hence, the objects
should be checked its distinct hash code before storing into
HashTable.

Is This Answer Correct ?    16 Yes 2 No

What are uses of Hash Code?..

Answer / guest

memory location

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More Core Java Interview Questions

IN java collections we have both interfaces and classes. instead of using interfaces why we can't use classes only like that why we can't use interfaces only. why we need two things interface and class.

6 Answers   Accenture, CTS,


Write a program to print the pattern given below

0 Answers  


When do we use hashset over treeset?

0 Answers  


why is multiple inheritance not allowed in java?

7 Answers   Elementus Technologies, Huawei, Infosys,


How is string stored in java?

0 Answers  






how many types of cloning?

4 Answers   Mobily,


How do you write a scanner class in java?

0 Answers  


why java is better then .net?

5 Answers   HCL, iGate,


Is java util regex pattern thread safe?

0 Answers  


what is the difference between AWT and SWING what is the advantage of using swing?

3 Answers  


What is internal iteration in java se 8?

0 Answers  


why abstract class does not have object creation

6 Answers   Value Labs,


Categories