How does HashMap internally works | Java Interview Questions in Hindi

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

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

  • @kislayaroy5253
    @kislayaroy5253 2 года назад +13

    I asked this question thousand times with my trainer and my seniors devloper why we override .equals() in main class believe me no has better explain it like you did or even google don't know the answer just love it 🔥♥️

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

      where is the answer can u share video link plz

  • @ashok55-v1h
    @ashok55-v1h 7 месяцев назад +1

    Sir i watch your tutorials and their is no doubt that you are one of the best teacher i request you please create vidoe on HashSet internal Working...thank you

  • @anilgadekar3036
    @anilgadekar3036 2 года назад +7

    Super explanation, but one point I have to add here if u want,
    If we got hashcode is same then we first call internally '==' operator to check both object if it is same then we call .equals() method. If I'm wrong please correct me.

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

      Not sure , but u r calling key as Object in ur statement, so I think no since whatever type of key is, Java consider them as Object and calls equals method. And (== is used for primitive data type) mostly

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

      Equals method string mein hinoverride hai already lekin yahan nahi

    • @Tashi-zc6ed
      @Tashi-zc6ed 5 месяцев назад

      ​@@meghabahansamal7697 ha correct

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

    Thanks Durgesh.. keep this interview series questions ..

  • @ripusudansoni3366
    @ripusudansoni3366 2 года назад +5

    hii durgesh I regular watch your video. spring series is really good series , please make video on soap api and rest api and new concept also

  • @ShinAkuma
    @ShinAkuma 2 года назад +57

    9/10 Interviewers ask this question. And then you never use this information in work.😆

  • @YogeshKanwar-n4v
    @YogeshKanwar-n4v 5 месяцев назад

    this is really amazing explanation

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

    You make things very hard...

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

    I am following all your videos

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

    Superb all of ur videos

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

    sir please make a complete playlist of java interview questions.... please🙏🙏🙏🙏🙏🙏

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

    great explanation!

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

    Bhaiya collection ke har topic par interview related ek video bana do

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

    Sir threshold value kaise nikalte hai wo bhi puchte hai iske baad. Uspe bhi ek video bna dijiye sir.

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

    Great explaination as always

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

    Please internal working of ConcurrentHashMap and HashSet pr bhi video banaiye.

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

    Thanks Man!!!!!

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 2 года назад

    Very helpful sir

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

    Sir please continue this series

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

    Very nice explanation

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

    Please make series of multithreading and exexutor framework.

  • @District876
    @District876 Месяц назад

    Bhaiya pls mention N is the current bucket size

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

    Awesome video, sir ap ek Hastable ka bho short video bana dijiye

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

    Thanks sirji ur teaching is very helpful for my getting job heartly thanks sir

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

    Hi Durgesh thank you for making such vedios , please make video on shallow clone deep clone

  • @12_sushantgupta83
    @12_sushantgupta83 Год назад

    When we create first node what will it keep in the hash component of first node

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

    Can you please also add a internal working of concurrent hashmap

  • @shilpskamble
    @shilpskamble 19 дней назад

    nice

  • @42_nabihasan77
    @42_nabihasan77 Год назад

    kindly make the video serialization and deserialization in java

  • @SHIVAAY944
    @SHIVAAY944 Месяц назад

    what is n here is it size of bucket. i.e. size =16 ? Clarify once.

  • @Nikhil-yi1rg
    @Nikhil-yi1rg Год назад

    Sir I havea question.. what if two same keys are stored in one bucket with different values then how we will get the key and value ? by using get method??

    • @Arjun-jn5rn
      @Arjun-jn5rn 5 месяцев назад

      It is not possible to have duplicate key in hashmap. If we try to put same key with different value then it will override the newer value with older one.

  • @kumargaur7623
    @kumargaur7623 5 месяцев назад +1

    Hash&(n-1) in this what is n-1 sir

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

    You said in hash collision time in one bucket multiple node store, after get function use which node values display, you didn’t tell us

  • @priyankagawali-qv3rx
    @priyankagawali-qv3rx 9 месяцев назад

    how garbage collector works internally please make a such video forthis question also.

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

    what is n here while calculating the index?

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

    make video on spring project conection and configure with.yaml file

  • @AmitChauhan-fv5mf
    @AmitChauhan-fv5mf 2 года назад +1

    can you create a video on singleton class with example...maybe db connection on different envt like test, local, prod

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

    please make video on react with story book architecure for fast performance

  • @_var.onwheels
    @_var.onwheels 2 года назад

    At 14:15 if nodes are keep adding in linkedlist data structure then how come get operation is O(1) in HashMap?

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

      if adding node in one bucket is getting above threshold limit then internally HashMap will replace linked list to Binary Tree structure.

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

    How to retrieve only single key value pair from hashmap sir

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 2 года назад

    Thanks sir

  • @GautamKumar-xy7mh
    @GautamKumar-xy7mh 2 года назад

    Thanks

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

    what is n here ? from where this formula will find the value of n?

    • @Sandip_Tamhane
      @Sandip_Tamhane 9 месяцев назад

      It's a size of HashMap(n). Default size is 16...

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

    good

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

    ❤❤❤❤

  • @HarshaliSanyo24
    @HarshaliSanyo24 10 месяцев назад

    How does hashmap internally work??

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

    How hashcode you take same ...bcz hashmap does not take duplicate key.so how hashcode will be same.. index may be same ..

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

      abey wo hash function automatically hash code create krta hai but by chance code same ho jata hai

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

    And if the hashcode is same then how we can get the perticular value

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

    Hi,
    I have a doubt,if we put some value in a map and suppose that is stored in 11th bucket.Again a new k,v is inserted and we got same hash code of 11th bucket.Then the new node that will be created stored in 12th Bucket or not?

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

      He already shown this example. It will stored in 11 bucket only but it will have LinkedList.

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

    what is N here... index = hash & (N - 1)

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

      N is bucket size

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

    if index 17 aaya to kya karege..abhi to hamare pass sirf 16 nodes hi h

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

    Its urgent can u tell me sql validation how we can do

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

    🙏👍

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

    100/100

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

    I've also been asked 😢

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

    Are bhai has nhi hash he vo

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

    sir, what is hashcode? how does internally works?

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

      hashcode is just address of particular object which is stored in hexadecimal format.

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

      @@rushikeshgodase8498 so how can address of different object be same?

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

      @rushikeshgodase8498 actually hashcode is not address of any object. In most cases it return a unique integer value. hashCode() method uses internal address and perform some operation then it return a unique integer value. so hashcode != address of object

  • @Saurabh-fe2bg
    @Saurabh-fe2bg Год назад

    Har 2 min me ad lagaya hai use acha paid course hi khol lete