How does HashMap internally works | Java Interview Questions in Hindi

Поделиться
HTML-код
  • Опубликовано: 2 мар 2022
  • In this video i am going to discuss how hasmap integrally stores values.
    HashMap is a part of the Java collection framework. It uses a technique called Hashing. It implements the map interface. It stores the data in the pair of Key and Value.
    Interview Series:
    Telegram Link for Doubt: t.me/learncodewithdurgesh
    Important Videos:
    ➡️React JS with Project : • 🔥 🔥 Complete React Js ...
    ➡️Learn JDBC in one video: • JDBC Crash Course in 1...
    ➡️Learn Python in One Video: • Learn Python in One Vi...
    ➡️Learn HTML in one video: • Jquery in one video in...
    ➡️Learn HTML form in one video: • Jquery in one video in...
    ➡️Learn JavaScript in one videos: • Learn JavaScript in O...
    ➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
    ➡️Learn CSS in one video: • Jquery in one video in...
    ➡️Jquery in one video: • Jquery in one video in...
    Kotlin is one video: • Kotlin | Learn Kotlin ...
    ➡️Complete Python Project - RUclips downloader in one video: • Jquery in one video in...
    Important Playlist:
    ➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
    ➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
    ➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
    ➡️Hibernate Tutorials: • Hibernate Tutorial for...
    ➡️E-Commerce Project using Java: • E-Commerce Project usi...
    ➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
    ➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
    ➡️Learn Technology in One Vides: • Learn in one video : C...
    ➡️Programming Tips for Programmers: • Coding Tips and Discus...
    ➡️Complete Python for Beginners: • Complete Python Tutori...
    ➡️Important Python Projects: • Python Projects in Hindi
    ➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
    ➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
    ➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
    ➡️Java Swing Projects: • Java Projects for begi...
    ➡️Java Core Concepts: • Java Core Tutorial
    ➡️Kya aap Jante hai Series: • kya app jante hai : s...
    Important Links:
    👉Official Website (Source Code): learncodewithdurgesh.com/
    👉Telegram Discussion Group: t.me/learncodewithdurgesh
    👉Follow me on Instagram: / durgesh_k_t
    👉Follow on Facebook / learncodewithdurgesh
    Disclaimer:
    All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.

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

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

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

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

    Thanks Durgesh.. keep this interview series questions ..

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

    Great explaination as always

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

    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

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

    Superb all of ur videos

  • @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

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

    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

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

    great explanation!

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

    I am following all your videos

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

    You make things very hard...

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

    Very helpful sir

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

    Thanks Man!!!!!

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

    Sir please continue this series

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

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

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

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

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

    Thanks sir

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

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

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

    Thanks

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

    Very nice explanation

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

    Can you please also add a internal working of concurrent hashmap

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

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

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

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

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

    kindly make the video serialization and deserialization in java

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

    good

  • @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 Год назад

      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 10 месяцев назад

      Equals method string mein hinoverride hai already lekin yahan nahi

  • @12_sushantgupta83
    @12_sushantgupta83 8 месяцев назад

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

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

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

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

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

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

    ❤❤❤❤

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

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

  • @Nikhil-yi1rg
    @Nikhil-yi1rg 5 месяцев назад

    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??

  • @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

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

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

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

    Please make series of multithreading and exexutor framework.

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

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

  • @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 Год назад

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

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

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

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

    100/100

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

    🙏👍

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

    How to retrieve only single key value pair from hashmap 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

  • @anandshukla4851
    @anandshukla4851 7 месяцев назад

    what is n here while calculating the index?

  • @_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 Год назад

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

  • @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 6 месяцев назад

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

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

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

    • @user-xh6nz8zg2z
      @user-xh6nz8zg2z Год назад

      if you divide any value by 15 then the remainder will always be less than 15.
      It's simple mathematics.
      I hope you got an answer.

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

    How does hashmap internally work??

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

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

    • @user-ev9th8ee9w
      @user-ev9th8ee9w 3 месяца назад

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

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

    I've also been asked 😢

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

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

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

    Are bhai has nhi hash he vo

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

    sir, what is hashcode? how does internally works?

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

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

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

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

    • @anupamanand1550
      @anupamanand1550 8 месяцев назад

      @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