1.

What Is Hash-collision In Hash Based Collections?

Answer»

In HashMap, using the KEY, a Hash is calculated and that hash VALUE decides in which bucket the particular Map.Entry object will RESIDE.

Hash collision means more than ONE key having the same calculated hash value THUS stored in the same bucket. In HashMap, in that case Entry objects are stored as a linked-list with in the same bucket.

In HashMap, using the key, a Hash is calculated and that hash value decides in which bucket the particular Map.Entry object will reside.

Hash collision means more than one key having the same calculated hash value thus stored in the same bucket. In HashMap, in that case Entry objects are stored as a linked-list with in the same bucket.



Discussion

No Comment Found