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.
9/10 Interviewers ask this question. And then you never use this information in work.😆
hahahaha lol, but TRUE !
@@sivavaraprasad778 u working as a Java develope
True man 🤣🤣🤣🤣🤣
Exactly 💯
Right
Thanks Durgesh.. keep this interview series questions ..
Great explaination as always
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 🔥♥️
where is the answer can u share video link plz
Superb all of ur videos
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
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
great explanation!
I am following all your videos
You make things very hard...
Very helpful sir
Thanks Man!!!!!
Sir please continue this series
Hi Durgesh thank you for making such vedios , please make video on shallow clone deep clone
sir please make a complete playlist of java interview questions.... please🙏🙏🙏🙏🙏🙏
Thanks sir
Awesome video, sir ap ek Hastable ka bho short video bana dijiye
Thanks
Very nice explanation
Can you please also add a internal working of concurrent hashmap
please make video on react with story book architecure for fast performance
Bhaiya collection ke har topic par interview related ek video bana do
kindly make the video serialization and deserialization in java
good
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.
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
Equals method string mein hinoverride hai already lekin yahan nahi
When we create first node what will it keep in the hash component of first node
Sir threshold value kaise nikalte hai wo bhi puchte hai iske baad. Uspe bhi ek video bna dijiye sir.
make video on spring project conection and configure with.yaml file
❤❤❤❤
And if the hashcode is same then how we can get the perticular value
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??
can you create a video on singleton class with example...maybe db connection on different envt like test, local, prod
Ok
Thanks sirji ur teaching is very helpful for my getting job heartly thanks sir
Please make series of multithreading and exexutor framework.
Ok
how garbage collector works internally please make a such video forthis question also.
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?
He already shown this example. It will stored in 11 bucket only but it will have LinkedList.
Its urgent can u tell me sql validation how we can do
100/100
🙏👍
How to retrieve only single key value pair from hashmap sir
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
what is n here while calculating the index?
At 14:15 if nodes are keep adding in linkedlist data structure then how come get operation is O(1) in HashMap?
if adding node in one bucket is getting above threshold limit then internally HashMap will replace linked list to Binary Tree structure.
How hashcode you take same ...bcz hashmap does not take duplicate key.so how hashcode will be same.. index may be same ..
abey wo hash function automatically hash code create krta hai but by chance code same ho jata hai
if index 17 aaya to kya karege..abhi to hamare pass sirf 16 nodes hi h
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.
How does hashmap internally work??
what is n here ? from where this formula will find the value of n?
It's a size of HashMap(n). Default size is 16...
I've also been asked 😢
what is N here... index = hash & (N - 1)
N is bucket size
Are bhai has nhi hash he vo
sir, what is hashcode? how does internally works?
hashcode is just address of particular object which is stored in hexadecimal format.
@@rushikeshgodase8498 so how can address of different object be same?
@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
Har 2 min me ad lagaya hai use acha paid course hi khol lete