Core Java With OCJP/SCJP: Concurrent Collections Part-4 || ConcurrentHashMap Details

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024
  • java
    Basic Java Tutorial for beginners
    Basic Java Programming for beginners
    Core Java By Durga Sir
    Core Java
    Core Java Video Tutorials
    Core Java Tutorial for beginners with examples
    Core Java Tutorial
    Core Java DURGASOFT
    Durgasoft Core Java
    Durgasoft Java
    durga software solutions core java videos
    durga software solutions java
    How to learn java
    How to learn java programming language for beginners
    learn java
    learn java programming for beginners
    programming in java
    understanding java
    java application development tutorial
    java beginner tutorial
    java basics for beginners
    java for beginners
    java lessons
    java lectures
    java language tutorial for beginners
    java programming tutorial
    java programming for beginners
    java tutorial for beginners
    java tutorial
    java tutorial by durga sir
    ====================================
    Java tutorial by durga sir
    goo.gl/XWb4RL
    Java 9 by durga sir
    goo.gl/hXGyBW
    Java 1.8 Version New Features by Durga sir
    goo.gl/iHXXYU
    Adv Java JDBC Tutorial by Durga sir
    goo.gl/8q16Eo
    OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir
    goo.gl/gC6R7f
    Core Java by NagoorBabu sir
    goo.gl/s6Nvj1
    Advenced Java by Nagoorbabu sir
    goo.gl/ZZonzJ
    CoreJava by Ratan
    goo.gl/3VM19v
    Advanced Java jdbc by Ratan
    goo.gl/Rn2UXr
    Advjava tutorials - JSP by Ratan
    goo.gl/Z6ytxm
    Adv java servlets tutorial by ratan
    goo.gl/zTwi9y
    Servlet and JSP Tutorial by anji reddy
    goo.gl/jZMRUv
    Advanced Java Jdbc by Anjireddy
    goo.gl/16CGzX
    Hibernate byAnjireddy
    goo.gl/qQojvZ
    Struts by Anjireddy
    goo.gl/nE1Eof
    Spring by Mr.AnjiReddy
    goo.gl/NfN14R
    ADV JAVA by Naveen
    goo.gl/bhSsXF
    Spring by Mr.Naveen
    goo.gl/huVwFN
    Hibernate by Mr. Naveen
    goo.gl/TY3Wpd
    Struts by Mr.Naveen
    goo.gl/Vkmiw7

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

  • @ranveervaghela7030
    @ranveervaghela7030 24 дня назад +2

    Completed watching on Oct 13, 2024 at 12.42 AM

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

    Whenever i search for a topic many times your tutorial got in search, I never watched. But recently I made your videos prioritized 1st. Your giving indetail explaination for every topic. Thank you..

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

      Hello Kartheek.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @omnamahshivaya2054
    @omnamahshivaya2054 6 месяцев назад +2

    Thanks sir, you are really GOD of Java.

    • @DurgaSoftwareSolutions
      @DurgaSoftwareSolutions  6 месяцев назад

      Hello Friend.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @ryan-bo2xi
    @ryan-bo2xi 8 лет назад +20

    I am a former student of Durga sir and am working now for a Big 4 Giant IT company . The way he teaches the basics cannot be taught by any java language developer who are working in Oracle or take any faculty or R&D guy. This is the simplest form of java food available on planet earth . Have it while you have time. Kudos sir !!!

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

      Tq Aryan...

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

      true

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

      Well said bro :)

    • @zeliofern
      @zeliofern 6 лет назад +1

      Very funny , how many good engineers you came across? Do you even know what is R&D?? You are still a kid in engineering, try to see real world of engineers. Durga just give answers to questions but design and analysis is a art which come by years of excellent work on large scale projects , don't insult RND guys. Improve yourself first.

    • @half_demon1466
      @half_demon1466 5 лет назад +2

      @@zeliofern ji zelio,can u ol ase tell what is segment or bucket in concurrent hashmap.

  • @sanketkhose8316
    @sanketkhose8316 2 года назад +2

    Next level teaching ❤️ sir hats off literally i got frustrated due to surfing on internet about concurrent but i saw this video i stop solution i got Thankyou ✅️

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

      Hello Sanket.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @DivuSiddhu
    @DivuSiddhu 6 лет назад +4

    Excellently explained to core important basic concepts in depth with clear UNDERSTANDING ,keep posting such important topic videos Durga Sir, Appreciate in deed.

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

      Hello Divu.
      Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    Thanks Sir, today I got the clear understanding on the ConcurrentHashMap to some extent.

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

      Hello Dev.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @EngineerVaibhav
    @EngineerVaibhav Год назад +4

    ConcurrentHashMap initial capacity is 16
    Fill ratio is 0.75
    Concurrency level is 16❤

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

    i never ever seen a person teaches like u sir 💯

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

      Hello Raj.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @karthikch9343
    @karthikch9343 5 лет назад +2

    very clear explanation sir.I was searching for other websites for clear understanding but i couldn't get it.Here in this video your explanation about the topic is excellent sir.

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

      Hello Karthik.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @prakherjindal5440
    @prakherjindal5440 Год назад +2

    HashMap vs HashTable vs ConcurrentHashMap - 01:35 - 10:35
    internal of ConcurrentHashMap - 14:05(check content of board)
    constructors of ConcurrentHashMap - 16:40 - 18:35

  • @SHIVASAIAKULA-t7y
    @SHIVASAIAKULA-t7y 4 месяца назад +3

    Hello sir, Why can't you start teaching SpringBoot...it will be very helpful for us🙃🥲

    • @DurgaSoftwareSolutions
      @DurgaSoftwareSolutions  4 месяца назад

      Hello Shiva.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    thank you so much durga sir for your tutorials ... your tutorials are very valuable

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

    Incorrect information at 10:00 - When concurrencyLevel is greater than intialCapacity. it is not that every bucket has two lock, rather intialCapacity is made equal to concurrencyLevel.
    below is the source code which does this.
    if (initialCapacity < concurrencyLevel) // Use at least as many bins
    initialCapacity = concurrencyLevel; // as estimated threads
    That means concurrencyLevel can never be greater than intialCapacity. It will always be less than or equal to intialCapacity.

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

      u are using less than symbol

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

      wonder if different versions of java implement this differently.

  • @priyankatiwari-ly8gf
    @priyankatiwari-ly8gf 3 года назад +1

    Awesome explanation...thank u so much Sir

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

      Hello Priyanka.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @EngineerVaibhav
    @EngineerVaibhav Год назад +2

    157 video completed❤🎉

  • @haykmkrtchyan7093
    @haykmkrtchyan7093 6 месяцев назад +1

    Note that in Java 8 we don't have segment locking or concurrency level. In Java 8, each hash bucket can get updated individually, so as long as there are no hash collisions, there can be as many concurrent updates as its current capacity.

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

    You explained ConcurrentHashMap very well. Thank you sir.

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

      Hello Yugal.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    He is GOD of Core Java

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

      Hello Jayanta.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

  • @chetankhandave1072
    @chetankhandave1072 5 лет назад +2

    Very good explanation sir, but I have doubt on load factor because in documentation "loadFactor: the load factor (table density) for establishing the initial table size".
    when I pass any argument as load factor then it is used to calculate size of array to store elements,
    public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel)
    {
    if (!(loadFactor > 0.0f) || initialCapacity < 0 || concurrencyLevel = (long)MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : tableSizeFor((int)size);
    this.sizeCtl = cap;
    }
    If I pass load factor as 0.5 then also it resizes table after filling it 75% not after 50%.
    I am using java 8, please help me to understand it.

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

      Hello Chetan.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

  • @europeteluguvlogsbykiwi
    @europeteluguvlogsbykiwi 4 года назад +3

    Always super master...👌

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

      Hello Rakesh.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    Please explain realtime example for hasmap and ConcarentHashmap

  • @Prakash-gz6py
    @Prakash-gz6py 2 года назад +1

    Thank you God 🙏🏻

  • @shanashafkat2247
    @shanashafkat2247 6 лет назад +2

    Sir, you are great 👍

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

      Hello Shana.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    Very useful tutorial....thanks sir

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

    Sir can you explain with example with thread etc

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

    God 🙏 of Java

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

      Hello Sahil.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    What will happen if one thread is reading from a particular bucket and other thread is updating the same bucket? Is it even possible? Will the latest value be available for read operation?

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

      This simultaneous operation is not possible.
      consider that thread A is performing read operation and thread B requests for update operation. The lock for that segment will only be given after thread A completes its read operation.
      thus a condition where one thread is reading and one thread is updating will not happen at all.

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

      Amitkumar Gupta It can happen and that is why concurrent hashmap is not automic and u can not rely on contains method of this.

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

      In a CHM this is allowed; reads are non-blocking and so read and write to and from the same bucket is perfectly allowed in CHM; and there is no inconsistency of data as well.

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

    Sir, I am big fan of you. I want to know why null is not allowed in Hashtable or in ConcurrentHashMap?

  • @harshadsamant244
    @harshadsamant244 5 лет назад +2

    God bless you

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

    Thanks Sir

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

    What is the real time usage where we want to use concurrent hash map

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

      Hello Anirudh.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    Best explanation sir.

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

    Can in one segment update operation perform parralely or not ?

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

      Hello Samadhan.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    concurrent Hashmap is implemented with hashtable so multiple hashtable are created but does hashtable not block read operation

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

    Does this playlist have DSA part?

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

      Hello Avinash.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    god of java

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

      Hello Krishna.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/kqvaf2

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

    Hello sir!
    I have one question what is the difference between String s = "Nand"; and String s = new String("Nand");.
    Thank you sir in advance.

    • @swatirupnar9996
      @swatirupnar9996 6 лет назад +2

      String s="Nand" this will create only one object that in string constant pool.
      string s=new String("Nand") will create two objects, one is in heap memory and second is String constant pool.

  • @vijaykorke8837
    @vijaykorke8837 19 дней назад +1

    done today, 18, OCT, 2024 12:05 AM

  • @MunniDivya
    @MunniDivya 6 лет назад +1

    great

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

      Hello Divya,
      Thanks for your valuable feedback.It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
      goo.gl/U1KKyi
      You an see more Java videos following link:
      Java tutorial by durga sir
      goo.gl/XWb4RL
      Java 9 by durga sir
      goo.gl/hXGyBW
      Java 1.8 Version New Features by Durga sir
      goo.gl/iHXXYU
      Adv Java JDBC Tutorial by Durga sir
      goo.gl/8q16Eo
      OCJA 1.8 Java SE 8 Programmer - I (1Z0 - 808 ) By Durga sir
      goo.gl/gC6R7f
      Core Java by NagoorBabu sir
      goo.gl/s6Nvj1
      Advenced Java by Nagoorbabu sir
      goo.gl/ZZonzJ
      CoreJava by Ratan
      goo.gl/3VM19v
      Advanced Java jdbc by Ratan
      goo.gl/Rn2UXr
      Advjava tutorials - JSP by Ratan
      goo.gl/Z6ytxm
      Adv java servlets tutorial by ratan
      goo.gl/zTwi9y
      Servlet and JSP Tutorial by anji reddy
      goo.gl/jZMRUv
      Advanced Java Jdbc by Anjireddy
      goo.gl/16CGzX
      Hibernate byAnjireddy
      goo.gl/qQojvZ
      Struts by Anjireddy
      goo.gl/nE1Eof
      Spring by Mr.AnjiReddy
      goo.gl/NfN14R
      ADV JAVA by Naveen
      goo.gl/bhSsXF
      Spring by Mr.Naveen
      goo.gl/huVwFN
      Hibernate by Mr. Naveen
      goo.gl/TY3Wpd
      Struts by Mr.Naveen
      goo.gl/Vkmiw7

  • @zeliofern
    @zeliofern 6 лет назад +3

    He helped many dummy engineers but still durgas lectures are very basic and are not at advanced level. His lectures have explanation more at implementation level and not at design and analysis level. Working on design is a art which takes years of actual experience , it's not about finding answer to the question.

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

    👏👌🐎🥳

  • @half_demon1466
    @half_demon1466 5 лет назад +2

    Could anyone help me with what is segment and bucket here?

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

      Hello Ashish.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    Pls tell why ConcurrentHashMap doesnt throw ConcurrentModificationException ?

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

      Firstly, CHM does not throw ConcurrentModificationException ; its Iterators (Enumerators etc which throw it); because Iterators which on the copy of CHM taken at the time of Iterator it is thread safe and hence no modifcation exception.

  • @राजनगोंगल
    @राजनगोंगल 10 месяцев назад +1

    👍👍👍👍👍👍🙏🙏🙏🙏🙏🙏👏👏👏👏👏👏

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

    Sir, Can you please explain how we can provide lock at bucket level?

  • @rajaseemon
    @rajaseemon Год назад +1

    Sir, Initial bucket size by default 16 and concurrency level wants custom to set 7 then how the locking mechanism assignment will it work internally?

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

      Hello Friend.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    How ConcurrenthashMap manages if Concurrency level is HIGHER than the number of Buckets?
    like :: initialCapacity = 16, concurrencyLevel = 32 then what happens.. To this just see the below ConcurrentHashMap constructor internal implementation code
    public ConcurrentHashMap(int initialCapacity,
    float loadFactor, int concurrencyLevel) {
    if (!(loadFactor > 0.0f) || initialCapacity < 0 || concurrencyLevel = (long)MAXIMUM_CAPACITY) ?
    MAXIMUM_CAPACITY : tableSizeFor((int)size);
    this.sizeCtl = cap;
    }

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

      Hello Narsimha.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    Who will explain why no null keys?
    What will happen if 2 threads are reading a segment and 3rd thread deletes one of the entry in that segment?
    How is locking done?
    These are some of the very basic facts which you have missed.
    Disappointing.

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

      I think null key is missing because of hashing of null and if the 2 threads has been started before 3rd thread, it will read that deleted item otherwise will not read.