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

Комментарии • 177

  • @bhagyashreedhavalshankh8452
    @bhagyashreedhavalshankh8452 7 лет назад +114

    Why did u stop making more tutorials ! Please keep up this amazing work.

    • @The64v
      @The64v 4 года назад +4

      I think he got a job at Google to be honest with you.

    • @MakeItStik
      @MakeItStik 4 года назад +1

      +1, he was doing so great with the content.

    • @MakeItStik
      @MakeItStik 4 года назад

      @@The64v :( Really !

  • @aavocadoToast
    @aavocadoToast 3 года назад +2

    Just came across, this actually seems like a really good channel. Simple, detailed & easy to understand explanations.

  • @gunturmanju
    @gunturmanju 6 лет назад +12

    Awesome Tutorial. I always watch these before i take interviews. Thank you !! Please kindly post more :)

  • @betowarrior_
    @betowarrior_ 7 лет назад +6

    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.

  • @shuvenduoffline
    @shuvenduoffline Год назад

    Best of the best! It is the most details and premium content I could say!

  • @ponsivakumarmanoharan4994
    @ponsivakumarmanoharan4994 3 года назад +1

    amazing, better explanation with good graphics. very easy to understand.

  • @vyshnavramesh9305
    @vyshnavramesh9305 2 года назад +1

    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().

  • @parthec1
    @parthec1 2 года назад

    Thank you ranjith for posting with examples which help u me to remember for ever,,,,keep posting such contents,,👍

  • @cimbonda24
    @cimbonda24 8 лет назад

    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

  • @pranjalahluwalia
    @pranjalahluwalia 6 лет назад

    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.

  • @JitendraKumar-lt8fl
    @JitendraKumar-lt8fl 6 лет назад

    Awesome concept of ConcurrentHashMap and ConcurrentSkipListMap

  • @SonysonyYnos
    @SonysonyYnos 7 лет назад +3

    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!

  • @kayeshparvez
    @kayeshparvez 5 лет назад +1

    Super teaching man !!

  • @tejasshah5188
    @tejasshah5188 8 лет назад +2

    Nice video which explain Map data structure in Java

  • @vaishalibhoite188
    @vaishalibhoite188 3 года назад

    Awesome ! Simply Great ! Excellent Explanation ! Thank You so Much !

  • @chetanmunegowda4304
    @chetanmunegowda4304 7 лет назад +2

    Thanks so much for sharing your knowledge!!

  • @headlesshorseman17
    @headlesshorseman17 7 лет назад

    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!

  • @aquasaiyan7877
    @aquasaiyan7877 4 года назад

    Thank you sir for giving so many good contents

  • @naveen146114
    @naveen146114 7 лет назад

    Hi Ranjith ramachandran,I have seen all your videos they are outstanding, eagerly looking for more videos on threads and other concepts

  • @basics201
    @basics201 8 лет назад +7

    ur teaching way is good ..please make a video on threading in full details.

  • @vaishnavepranav7394
    @vaishnavepranav7394 11 месяцев назад

    Excellent video. Thanks a lot

  • @rahulabrol2211
    @rahulabrol2211 5 лет назад

    very well explained. Please keep this good work.

  • @voiceguy554
    @voiceguy554 4 года назад

    Hey Ranjith...your videos are topnotch...keep them coming :) Thanks!

  • @pallavimisra9753
    @pallavimisra9753 3 года назад

    Please make more videos.Your explanation is crystal clear.

  • @rahulsaini8
    @rahulsaini8 6 лет назад

    Very well explained. Better teacher than most of them out there. Please upload more topics.

  • @deepalisaxena8019
    @deepalisaxena8019 9 лет назад

    properly explained. Got alot of clarity for different versions of Map. Thanks.

  • @javahashmap9667
    @javahashmap9667 7 лет назад

    You are a great tutor and videos are worth watching. Simply great..!

  • @Dedeepya9
    @Dedeepya9 7 лет назад +1

    Didn't get bore in learning although its of around 42 mins.Thanks for explaining with good examples.

  • @prakashkchauhannn
    @prakashkchauhannn 6 лет назад

    Easy to understand and really very Good Explaining. Thanks.

  • @MakeItStik
    @MakeItStik 5 лет назад +1

    Hi Ranjith, can you upload more videos on concurrency. Everyone is counting on you. Your concepts are clear and explained to the point.

  • @deepaksrinivas1783
    @deepaksrinivas1783 6 лет назад

    Great tutorial! Excellent explanation! Please keep uploading more videos!!

  • @anupamwin
    @anupamwin 7 лет назад

    Very well explained with examples.Thanks...

  • @terminator8601
    @terminator8601 5 лет назад

    Ur style is amazing with gr8 knowledge

  • @MaheshKumar-em2yi
    @MaheshKumar-em2yi 8 лет назад

    Super and it's really very good video on Map interface :) Thank you very much for sharing this video.

  • @RajVerma-go4xk
    @RajVerma-go4xk 7 лет назад +12

    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.

  • @balajilinked2527
    @balajilinked2527 7 лет назад

    Your videos are really interesting and indepth. Thanks and keep the good work going. Waiting eagerly for your next videos.

  • @AnkitKumarZ
    @AnkitKumarZ 8 лет назад

    Really good video. Look forward to more content for you.
    Thank you.

  • @sanjayizardar2263
    @sanjayizardar2263 8 лет назад

    Hats off to you. Keep uploading such awesome videos.

  • @sankar0446
    @sankar0446 5 лет назад

    Useful great explanation sir thank u

  • @syedfazulu6505
    @syedfazulu6505 6 лет назад

    Thanks Ranjith for sharing knowledge to others ,This is very nice video

  • @deekshakulshreshtha2429
    @deekshakulshreshtha2429 8 лет назад +2

    seriously perfect video, Great Job Sir :) God Bless You Always

  • @fezm210
    @fezm210 8 лет назад

    liked the video especially the code examples and animation. look forward to more videos ;-)

  • @rpy1234
    @rpy1234 6 лет назад

    Smoothly done..Understood everything about Map

  • @surindersokhal7135
    @surindersokhal7135 7 лет назад

    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

  • @NeerkumarOOPS
    @NeerkumarOOPS 7 лет назад

    Really helpful understanding the maps concepts. Appreciate your hard work you put in. Looking more such videos.

  • @jayantasen23
    @jayantasen23 7 лет назад

    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.

  • @navnathhajare3499
    @navnathhajare3499 2 года назад

    Make more videos please your all unique video

  • @svalyavasvalyava9867
    @svalyavasvalyava9867 Год назад

    awesome explanation, thank you!!!!

  • @shubhverma9313
    @shubhverma9313 2 года назад

    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

  • @ashishkinger8592
    @ashishkinger8592 8 лет назад

    Thanks a lot for explaining the maps in details. Waiting for your video on multi threadings.

  • @rawatumrao17
    @rawatumrao17 8 лет назад

    Thanks a lot to post such a explanation. Great description with animation again want to say thanks.

  • @amitsoni9
    @amitsoni9 7 лет назад +2

    Kudos!! I love this tutorial. Please upload everything in a series.

  • @dhanyakumargonageri4259
    @dhanyakumargonageri4259 5 лет назад

    nice explanation.......

  • @isapir
    @isapir 8 лет назад

    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.

  • @bhushanbhange7065
    @bhushanbhange7065 7 лет назад

    @Ranjith ramachandran Looking forward for Advanced multi threading ! Watching your videos one would realize "Any thing is simple if you know it thoroughly "

  • @Rambabu-vc1um
    @Rambabu-vc1um 7 лет назад

    very good explanation. Thank you

  • @alexanderzhang7593
    @alexanderzhang7593 8 лет назад

    thank U Ranjith, very good Job.

  • @bikashrajguru
    @bikashrajguru 8 лет назад +6

    Thanks a lot Sir :) Awesome tutorial
    By any chance can u share the ppt u used for explaining them.

  • @nirajosh
    @nirajosh 8 лет назад

    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.

  • @arunamuthyala29
    @arunamuthyala29 8 лет назад

    Very good video

  • @shuklabhanuprakash
    @shuklabhanuprakash 6 лет назад

    Please make videos on concurrency. You make one of the videos with real world examples and simplest explanation.God bless you.

  • @AyushKumar-qi2qv
    @AyushKumar-qi2qv 8 лет назад

    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.

  • @Pritam91kar
    @Pritam91kar 4 года назад

    Thanks . Great Explanation .

  • @ipuluforu
    @ipuluforu 7 лет назад +2

    Great... Saved lot of time.

  • @amansrivastava7025
    @amansrivastava7025 9 лет назад

    good job Ranjith.

  • @SanthoshSurimani
    @SanthoshSurimani 8 лет назад

    Much Appreciated your effort Ranjith.. Good job.

  • @akshaythakur147
    @akshaythakur147 3 года назад

    where are you not posting new content? your videos are amazing, keep up the good work

  • @vivekr7896
    @vivekr7896 8 лет назад

    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

    • @ranjithramachandran5928
      @ranjithramachandran5928  8 лет назад

      +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.

    • @vivekr7896
      @vivekr7896 8 лет назад

      Thanks - subscribed.

  • @ashishagrawal7709
    @ashishagrawal7709 7 лет назад

    Hi Ranjith Sir,
    Waiting for your more videos on Core java concepts and Specially for Design Patterns..Thanks

  • @snair1986
    @snair1986 8 лет назад

    Nice explanation Ranjith. Helps in better understanding.Just a small rectification, its "Hashtable" and not "HashTable".

  • @anjaligupta6510
    @anjaligupta6510 5 лет назад

    Nice sir 👍

  • @yeruvanag7006
    @yeruvanag7006 8 лет назад

    nice yar thank u

  • @muralik5504
    @muralik5504 6 лет назад

    Very well explained, great!!!

  • @AnilKumar-pi1co
    @AnilKumar-pi1co 8 лет назад

    Nice Explanation...

  • @divyanshupreti3434
    @divyanshupreti3434 6 лет назад

    This is really good. Waiting fr other vids though.

  • @pvbembalkar
    @pvbembalkar 3 года назад

    Truly Masterclass...

  • @chanchalsahu5023
    @chanchalsahu5023 7 лет назад

    Thanks for uploading videos
    It helps a lot

  • @hyperborean72
    @hyperborean72 6 лет назад

    Great work
    Thanks a lot

  • @hagerelmahjoub1274
    @hagerelmahjoub1274 9 лет назад

    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

  • @jstar0008
    @jstar0008 8 лет назад

    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.

  • @SushilKumarBhaskar
    @SushilKumarBhaskar 8 лет назад

    impressive.Hats off to this guy...

  • @swapnilredekar1321
    @swapnilredekar1321 7 лет назад

    Hi Ranjith, Ur video was interesting. Please explain the difference between Collections.synchronizedMap() and hashtable.

  • @jeetparmar9343
    @jeetparmar9343 8 лет назад

    Awesome tutorial

  • @mahalerahulm
    @mahalerahulm 8 лет назад

    Very nice explanation !

  • @numanmakan7227
    @numanmakan7227 5 лет назад

    Thanks a lot Ranjith :) Awesome tutorial

  • @sandipbhaumik
    @sandipbhaumik 6 лет назад

    Please add some more videos which will help us to acquire the knowledge.

  • @madhurajsingh6558
    @madhurajsingh6558 6 лет назад

    Very much in depth

  • @dudadoodedoodedoode
    @dudadoodedoodedoode 8 лет назад

    Adipoli explanation machanae! Subscribed!

  • @JainNamit
    @JainNamit 3 года назад

    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.

  • @kattarkhiladi1118
    @kattarkhiladi1118 9 лет назад

    nice description , can you please give explanation on source code concurrenthashmap thanks

  • @manishthakur2382
    @manishthakur2382 3 года назад

    I have just one question, Why did you stop making these brilliant videos ????

  • @rupsag1520
    @rupsag1520 5 лет назад

    Your tutorials are really helpful..Why are not u uploading new tutorial videos? Please make and upload more videos.

  • @penchalrao5297
    @penchalrao5297 8 лет назад +1

    Nice Tutorial

  • @sathishkumarbt
    @sathishkumarbt 9 лет назад

    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.

    • @ranjithramachandran5928
      @ranjithramachandran5928  9 лет назад

      +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.

  • @meekutelusaaa
    @meekutelusaaa 8 лет назад

    A classic explanation...

  • @snjkmr568
    @snjkmr568 8 лет назад

    nice explanation

  • @vipinkoul9129
    @vipinkoul9129 4 года назад

    Awesome :-)

  • @shashankpaliwal6859
    @shashankpaliwal6859 7 лет назад +1

    When are you uploading more videos?
    Really looking forward to more videos like this.

  • @nirajosh
    @nirajosh 8 лет назад

    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.

  • @terminator8601
    @terminator8601 6 лет назад

    simply gr8