

How does java hashmap work ? HashMap is one of the most popular java.util data structures.
Its one of the associative array implementations, here I have explained its internals in simple terms using an animation. Java8 adds a bit of enhancement to HashMap by using a balanced tree when there is too much has collisions. I have covered that as well.
Please leave your comments if you liked this. Also, subscribe to the channel for updates on similar topics.
source
Initial capacity is 16, what is the next capacity if 16 buckets are full…??
Great Work. Good Explanation
awesummm…
Excellent explanation, It very knowledge worthy
Excellent explanation for this topic! Best regards from Argentina.
I got headache , please dont move continuously
Hi Ranjith,
Just saw this video and found it very useful. The way you explained hashmap using animation was really great and commendable.
Keeping making such great videos.
All the very best.
Awesome
Amazing explanation!
You are champ. Very nice explanation
https://youtu.be/XKMOs5LScN8 best videos
Such a great explanation
Can u please mention what happened to the duplicate key
Superb
finally i have understood hashing.
Why a balanced tree is being used only if treeify_thresold is high? Why not it being used instead of a list in all cases?
Hi Ranjith, please explain what happens when we try to override the key
Hi. The video is awesome but I have a question about something that I'm not toally sure. When he says (min 5:20) hash of "KING" is 2306996 I suppose that the hash algorithm computed the String KING and it returned another String whose length is an int of 2306996 positions. Is it right?
Thanks!
We've been doing hashmaps in class a lot and I haven't quite understood it until now. Thank you!
Recommended video
Simply explain how it happens well done
One of the best Explanation of Hashmap internal working + Java 8 enhancement.
Hi Ranjith, Thanks for very detailed explanation. Can you please make more videos on internal implementations of all the collections types. It will help all the Java folks. Thanks in advance. Hope will get the hear from you soon.
Good One
Hi , Can you plz explain HashMap Java 8 Implementation ..with your visual affects we can remember very well like linked list ..thx
Good tutorial for hash map implementaion
very well explained. thank you.
thanks much Ranjith …great explanation …
Can you teach me how to make such videos?
All the nodes in same bucket will have same hashcode right?you have said that different hashcode.how is it possible?
Hi Ranjith – Wonderful explanation. Can you please share the ppt if you dont mind. Also wanted to request if you can make a video of how concureentHashmap in java internally and how it different from hashtable and other synchronize methods.
thanks for explanation
8:10 but sir java have no pointers
malayali aano?
nicely explained
why do you use & instead % as the mod sign?
if the key and hash equals in java8 what happens..collision occurs or some other way to improve the result
How you are calculating index in get and put ?
It will be a great video if you explained with duplicate key, that will replace the old value and update the new value, along with hashCode() and equals() method.
Great work man. You actually cleared all my fear of hashmap data structure
Great video, this is the best video Ive seen explainig how hashmap works, thanks!!!!
People who has disliked, what are you guys expecting ? This is just perfect explanation!!
Simply perfect ! Awesome explanation
https://youtu.be/B_Xr0S8YJdc
Great Explanation!
nerd alert!
You are best
Thanks well explained.
Amazing, thank you for this bro.
Thanks man !! I perpectly understand 🙂