HashMap vs LinkedHashMap || Java interview question 2021

preview_player
Показать описание
HashMap:
The underlying data structure is Hashtable.
HashMap required less memory than LinkedHashMap.
Insertion order is not preserved and it is based on hashcode of keys.
Introduced in 1.2 version.

LinkedHashMap:
The underlying data structure is the combination of Hashtable and LinkedList.
LinkedHashMap requires more memory than HashMap.
Insertion order is preserved.
Introduced in 1.4 version.

#collectioninjava
#collectioninterviewquestion
#java
#javainterviewquestion If you want to help us for enlarging our channel, then please donate us by your own wish:
Paytm: 7509058785
Рекомендации по теме