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 🔥♥️
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
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
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??
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.
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 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
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
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
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
@@meghabahansamal7697 ha correct
Thanks Durgesh.. keep this interview series questions ..
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
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
this is really amazing explanation
You make things very hard...
I am following all your videos
Superb all of ur videos
sir please make a complete playlist of java interview questions.... please🙏🙏🙏🙏🙏🙏
great explanation!
Bhaiya collection ke har topic par interview related ek video bana do
Sir threshold value kaise nikalte hai wo bhi puchte hai iske baad. Uspe bhi ek video bna dijiye sir.
Great explaination as always
Please internal working of ConcurrentHashMap and HashSet pr bhi video banaiye.
Thanks Man!!!!!
Very helpful sir
Sir please continue this series
Very nice explanation
Please make series of multithreading and exexutor framework.
Ok
Bhaiya pls mention N is the current bucket size
Awesome video, sir ap ek Hastable ka bho short video bana dijiye
Thanks sirji ur teaching is very helpful for my getting job heartly thanks sir
Hi Durgesh thank you for making such vedios , please make video on shallow clone deep clone
When we create first node what will it keep in the hash component of first node
Can you please also add a internal working of concurrent hashmap
nice
kindly make the video serialization and deserialization in java
what is n here is it size of bucket. i.e. size =16 ? Clarify once.
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??
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.
Hash&(n-1) in this what is n-1 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
how garbage collector works internally please make a such video forthis question also.
what is n here while calculating the index?
make video on spring project conection and configure with.yaml file
can you create a video on singleton class with example...maybe db connection on different envt like test, local, prod
Ok
please make video on react with story book architecure for fast performance
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 to retrieve only single key value pair from hashmap sir
Thanks sir
Thanks
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...
good
❤❤❤❤
How does hashmap internally work??
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
And if the hashcode is same then how we can get the perticular value
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.
what is N here... index = hash & (N - 1)
N is bucket size
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.
Its urgent can u tell me sql validation how we can do
🙏👍
100/100
I've also been asked 😢
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