HashTable vs HashMap vs Concurrent HashMap all kinds of Map implementations
HTML-код
- Опубликовано: 7 сен 2024
- In JDK you have a lot of map implementations that you did not know even existed like EnumMap, IdentityHashMap and a lot of other implementations that are favorites of interviewers. In this video I am exploring various implementations available, and compare and contrast them with very good examples on WeakHashMap and ConcurrentHashmap.
#hashmap #hashcode #java #javaprogramming #hashtable #macbookair #easy #javainstitute #javascript #class #computerprogramming #beginners #learnjava #learn #study #freshers #interview #fypシ #fypシ゚viral #trending #fyp #interviewtips #interviewquestions #mustwatch #usa #india #global #viral
Why did u stop making more tutorials ! Please keep up this amazing work.
I think he got a job at Google to be honest with you.
+1, he was doing so great with the content.
@@The64v :( Really !
Just came across, this actually seems like a really good channel. Simple, detailed & easy to understand explanations.
Awesome Tutorial. I always watch these before i take interviews. Thank you !! Please kindly post more :)
Kudos, very well explained videos. I'm diving deep into the concurrent api and anything that has to do with multithreading and its really a whole new world.
Best of the best! It is the most details and premium content I could say!
amazing, better explanation with good graphics. very easy to understand.
Summary on concurency:
1. SynchronizedHashMap:
- decorator pattern: decorates with synchronization on all public apis
2. ConcurrentHashMap:
- only put() is synchronized, that too segment wise. So multiple writes can happen if on different segments By default 16 segment s are present, so 16 threads can write at the same time without locking each other.
- thus, no atomicity between get() and put(). You will have to synchronize yourself if your put() depends on get() value.
- AtomicInteger/Long.getAndIncrement() is an alternate for maintaining atomicity between get() and put().
Thank you ranjith for posting with examples which help u me to remember for ever,,,,keep posting such contents,,👍
I watched 4 videos man...your channel is unique...precious detail...everybody is used to present only outside the box...I like you present under the hood java...Thanks
Don't have words to appreciate your work. Watched around tons of videos but only you had clarity. Thank you so much for your wonderful insight, watched all your videos in one sitting. Please enlighten us by putting more useful videos.
Thanks for your kind words.
Awesome concept of ConcurrentHashMap and ConcurrentSkipListMap
so fantastic explanation! I love your code examples, very intuitive to follow and have an idea of what's going on. Keep up your good work!
Super teaching man !!
Nice video which explain Map data structure in Java
Awesome ! Simply Great ! Excellent Explanation ! Thank You so Much !
Thanks so much for sharing your knowledge!!
Very good video, also you speak very clearly which in my opinion gives you a very big edge over most tutorials out there on youtube.
Keep up the good work!
Thank you sir for giving so many good contents
Hi Ranjith ramachandran,I have seen all your videos they are outstanding, eagerly looking for more videos on threads and other concepts
ur teaching way is good ..please make a video on threading in full details.
Excellent video. Thanks a lot
very well explained. Please keep this good work.
Hey Ranjith...your videos are topnotch...keep them coming :) Thanks!
Please make more videos.Your explanation is crystal clear.
Very well explained. Better teacher than most of them out there. Please upload more topics.
properly explained. Got alot of clarity for different versions of Map. Thanks.
You are a great tutor and videos are worth watching. Simply great..!
Didn't get bore in learning although its of around 42 mins.Thanks for explaining with good examples.
Easy to understand and really very Good Explaining. Thanks.
Hi Ranjith, can you upload more videos on concurrency. Everyone is counting on you. Your concepts are clear and explained to the point.
Great tutorial! Excellent explanation! Please keep uploading more videos!!
Very well explained with examples.Thanks...
Ur style is amazing with gr8 knowledge
Super and it's really very good video on Map interface :) Thank you very much for sharing this video.
Hi ranjith this video is intersting. please let me know when u r going upload new videos for design patterns, i am waiting eagerly. previous design pattern videos are good.
Your videos are really interesting and indepth. Thanks and keep the good work going. Waiting eagerly for your next videos.
Really good video. Look forward to more content for you.
Thank you.
Hats off to you. Keep uploading such awesome videos.
Useful great explanation sir thank u
Thanks Ranjith for sharing knowledge to others ,This is very nice video
seriously perfect video, Great Job Sir :) God Bless You Always
liked the video especially the code examples and animation. look forward to more videos ;-)
Smoothly done..Understood everything about Map
Hi Ranjith Ramachandran,
All your videos are very well explained. I have few points to make for concurrent modification exceptions. It is not the modification(put, remove methods of hashmap) that throws the ConcurrentModificationException but iterator.next() actually throws it. Moreover updating the already existing keys does not throw any ConcurrentModificationException.
Please correct me, if I am wrong.
Regards,
Surinder Sokhal
Really helpful understanding the maps concepts. Appreciate your hard work you put in. Looking more such videos.
Hi Ranjith,
Your explanations were very fine. I had one request. Could you please put up a recording about the internal working of CHM code wise in more detail. Like the details about how the CHM is actually working, its internal implementations.
Make more videos please your all unique video
awesome explanation, thank you!!!!
it would have been great if you showed a working example of each Map with expected arguments etc , the explanation for treeMap on how the keys nodes are added was not clear , are they sorted and added or are they added and then the map autosorts them as a part of the push
Thanks a lot for explaining the maps in details. Waiting for your video on multi threadings.
Thanks a lot to post such a explanation. Great description with animation again want to say thanks.
Kudos!! I love this tutorial. Please upload everything in a series.
nice explanation.......
Excellent tutorial, thanks! It would be great if you could make more tutorials like this. I would personally love to see one about ThreadLocal. Thank you.
@Ranjith ramachandran Looking forward for Advanced multi threading ! Watching your videos one would realize "Any thing is simple if you know it thoroughly "
very good explanation. Thank you
thank U Ranjith, very good Job.
Thanks a lot Sir :) Awesome tutorial
By any chance can u share the ppt u used for explaining them.
Hi Ravi,
Its really great content to have a quick tour of all kind of map.
It will be beautiful if you can able to prepare some on internals working of ConcurrentSkipListMap similarly where you had nicely documented for HashMap.
Very good video
Please make videos on concurrency. You make one of the videos with real world examples and simplest explanation.God bless you.
Sir...Your explanations are really good. Please keep making such videos. Suggestion: Make a complete series on Java - Beginner to Advanced Levels. It would help a lot.
Thanks a lot again.
Thanks . Great Explanation .
Great... Saved lot of time.
good job Ranjith.
Much Appreciated your effort Ranjith.. Good job.
where are you not posting new content? your videos are amazing, keep up the good work
Hi Ranjith,
Got good clarity regarding weakHashMap. It would have been awesome if you added an example on Identity hashmap as well by showing how the IdentityHashMap varies by using == instead of equals.
Also could not understand the real importance of concurrent hash map if they are not able to provide data consistency in multithreaded environment.
Also if possible please do a video on java.util.concurrent features. Thanks a lot for sharing your Knowledge.
-Vivek
+Vivek R Thanks! concurrent hashmap is handy when too many threads are writing at the same time while other threads are reading from it. Most of the writes and the reads are guaranteed not to be blocked. That's a big advantage in certain systems. Data is consistent with last written snapshot.
For concurrently I am building a series, please subscribe for updates.
Thanks - subscribed.
Hi Ranjith Sir,
Waiting for your more videos on Core java concepts and Specially for Design Patterns..Thanks
Nice explanation Ranjith. Helps in better understanding.Just a small rectification, its "Hashtable" and not "HashTable".
Nice sir 👍
nice yar thank u
Very well explained, great!!!
Nice Explanation...
This is really good. Waiting fr other vids though.
Truly Masterclass...
Thanks for uploading videos
It helps a lot
Great work
Thanks a lot
Hi Ranjith,
I really liked this video, the explanations are clear, even the examples....
I would like to know if you have a video that explains references types in java ( Strong, Soft, Weak and phantom) with examples.
Thanks again and really good video
Hager
Great Videos!! Its like practically explaining everything whats on the book. Moreover, its a while now that I have been waiting for your Thread video. It would be great if you could also publish videos on topic like SOAP & Restful.
impressive.Hats off to this guy...
+Sushil Kumar Bhaskar Thanks!
Hi Ranjith, Ur video was interesting. Please explain the difference between Collections.synchronizedMap() and hashtable.
Awesome tutorial
Very nice explanation !
Thanks a lot Ranjith :) Awesome tutorial
Please add some more videos which will help us to acquire the knowledge.
Very much in depth
Adipoli explanation machanae! Subscribed!
Why have you stopped uploading...I have learned a lot from your tutorials. Please continue uploading more stuff on java concepts. And please create playlist of all java videos...so that I can add it to my library.
nice description , can you please give explanation on source code concurrenthashmap thanks
I have just one question, Why did you stop making these brilliant videos ????
Your tutorials are really helpful..Why are not u uploading new tutorial videos? Please make and upload more videos.
Nice Tutorial
Good video for me to understand the concepts..
Question :- You mentioned "scalable concurrent concurrentNavigableMap" for concurrentskiplistmap .could you please explain "scalablity of this datastructure".
Request:- If you have created a video on code walkthrough of these datastructure please share.
+Sathish Kumar , ConcurrentNavigableMap is a concurrent alternative map for sortedmap. Why is it scalable ? it has very narrowed down locking, which reduces scope and duration of lock on the data structure. The longer the locking(for example synchronized iteration), less scalable the map will be. For further understanding we would need to look at implementation details. Kindly subscribe for updates.
A classic explanation...
nice explanation
Awesome :-)
When are you uploading more videos?
Really looking forward to more videos like this.
Hi Ravi,
For concurrentHashMap, I have visited jdk 8 update 71. I couldn't able to see HashEntry class. Instead i saw Node class based implementation. I think HashEntry implementation was there till jdk 7.
+Nirav Joshi Yes, that is right!
simply gr8