How HashTable and HashMap key-value are stored in the memory?

后端 未结 4 1564
谎友^
谎友^ 2020-12-04 22:46

I understand there is a hashing technique is applied to a key to store its value in the memory address.

But I don\'t understand how the collision is happeni

4条回答
  •  独厮守ぢ
    2020-12-04 23:12

    After going through @Slanec's answer, do see the javadoc from Java-8, as there are significant changes. For ex: 'TREEIFY' where the LinkedList is converted to a TreeMap in case the threshold number of entries per bucket (currently 8) is reached.

提交回复
热议问题