Java collections interview questions | Why HashMap Keys are Immutable? | Immutability & HashMap

  Рет қаралды 57,978

Selenium Express

Selenium Express

Күн бұрын

In this video, We will discuss a few of the java collections interview questions which are asked so many times in the java interviews. So Hashmap and Immutability are closely related in java and it is expected to have counter questions from the interviewer. So let’s prepare some of the top collection framework interview questions in java.
Prerequisite: how hashmap works internally?
Why hashmap works internally? [Playlist]
• How HashMap works inte...
Lesson: #2 Interview questions on Java Immutable class and HashMap [ mmutability & HashMap ]
Timestamp :
Introduction : 00:00:00
What happens when we use mutable objects as HashMap Keys? 00:06:19
Breaking the hashmap properties - 00:12:35
the role of hashcode() in hashmap internal working in java - 00:14:18
Why HashMap Keys are Immutable? - 00 :18:51
the hashcode caching factor- 00:28:18
What will happen if the immutable classes are not marked as final? - 00:35:10
Subclass a immutable object- 00:38:01
Breaking immutable objects: 00:48:51
The impact of immutability on hashmap: 00:51:41
Reasons why the immutable class should be marked as final:00:54:51
String Vs StringBuffer- 00:57:45
So if you are looking for some top collection framework interview question/java interview questions and answers for experienced / java interview programs for freshers with answers; the above are some questions that you should try out.
for more java interview questions/java interview questions and answers for experienced /java interview questions and answers for freshers, consider subscribing to my channel.
/ @seleniumexpress
#CoreJavaInterviewQuestion #FAQForfreshers #FAQForExperienced
More core java interview questions :
Why String is immutable?
• Why string is immutabl...
String Hashcode caching internally. Hashcode caching for immutable classes (important)
• This is why string is ...
java interview questions and answers for experienced / Freshers [playlist]
• TOP 6 difference betwe...
For more courses visit
www.seleniumexpress.com
Any time you are getting stuck with issues, Feel free to ask for support.
You can send mail to seleniumexpress@gmail.com
you can ping me on my Facebook page
/ seleniumexpress
Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support”
/ 187000222361579
you can ask for support in my website forum
www.seleniumexpress.com
Follow me on Insta
/ selenium_express
Music :
-----
credits : -
(channel intro)
Adventures by A Himitsu / a-himitsu
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons.org/licenses/b...
Music released by Argofox • A Himitsu - Adventures...
Music provided by Audio Library • Adventures - A Himitsu...

Пікірлер: 95
@pawancricket13
@pawancricket13 3 жыл бұрын
Nagarro round 3 Interview ques 2021: -lambda expressions -prime numbers 1-50(using streams also) -Marker interface -spring annotations @Controller @Bean @Component @RestController - difference b/w @RestController and @Controller - .equals() and hashcode contract - diff between HashMap and HashSet - Callable interface - 2,3 input / output ques related to spring 1) one interface implemented by 2 componnets will it work? (@Qualifier) concept - try/catch with resources - HashMap implementation - API gateway - explain bean life cycle thanks a lot @selinuim express your videos helped me a lotttt 💙
@TheRebelMe
@TheRebelMe Жыл бұрын
I am running out of words to express my gratitude towards your efforts.I am feeling confident about this topic now.
@imvickie1497
@imvickie1497 2 жыл бұрын
Writing code and breaking our own code and make it to work, that is awesome 😀
@rajatmishra4704
@rajatmishra4704 2 жыл бұрын
Only one word fantastic man As a working professional I used to deep dive with your content
@Goon55555
@Goon55555 2 жыл бұрын
You are great at explaining these concepts and really bring your point home with your awesome examples!!! I'm definitely a better developer bc of you! Thumbs up on all your videos!!!
@nethravathim8422
@nethravathim8422 3 жыл бұрын
omg i just love the way you explain things. One of the best online platform to learn basic and master advance
@aibardulatov
@aibardulatov 6 ай бұрын
I am not lying) But Abhilash you are the best of the best teacher on whole youtube. You have your own style of explanation and providing information. Thank you very much. It would be great, if you make video about multi-threadding in same style. Because it is very hard part of questions in interview and also difficult topic to understand. And thank you that you speak in english, I am from Kazakhstan and it is good way learn Java from great teacher, like you
@anjaliwarrier1610
@anjaliwarrier1610 2 жыл бұрын
Excellent explanation .Expecting more of this type. Thank you so much
@KrishnaSingh-ci9zz
@KrishnaSingh-ci9zz 3 жыл бұрын
Love the way you explain. It helps a lot
@amitpandey-xe4zs
@amitpandey-xe4zs Жыл бұрын
Hi Abhilash, thank you for the training you provide. it has taken my java and spring-boot knowledge to next level.👌
@OrdinaryTalesofSamriddhi
@OrdinaryTalesofSamriddhi 3 жыл бұрын
Thanks a lot. This video has helped me a lot in my interview. You are the best.
@aayush5474
@aayush5474 2 жыл бұрын
This was explained beautifully!
@bozhokmaria
@bozhokmaria 2 жыл бұрын
best explanation + code demonstration
@viveksharma878
@viveksharma878 3 жыл бұрын
Very useful and amazing explanation, Thanks
@ganeshteradata976
@ganeshteradata976 3 жыл бұрын
Thanks for your knowledge sharing, please provide more videos on Java interview perspectives....like Core Java, Java 8 videos.
@narendra9903
@narendra9903 2 жыл бұрын
Great explanation.this deserves more views 👍
@rahulpant7795
@rahulpant7795 3 жыл бұрын
awesome explanation. thanks.
@yatendra__singh
@yatendra__singh 2 жыл бұрын
Just awesome explaination 👏👏
@shubhamjain8397
@shubhamjain8397 2 жыл бұрын
The way u explain the concept it's really appriciated sir please make a vedio for multithreading concept as well .
@RecheckTech
@RecheckTech 2 жыл бұрын
Just outstanding...
@mohitjoshi9658
@mohitjoshi9658 7 ай бұрын
so much knowledge in single video
@mateenmansoori6128
@mateenmansoori6128 2 жыл бұрын
Thanks to cover this topic.
@Atulyaanay8530
@Atulyaanay8530 2 жыл бұрын
you are always superb you just don't need any feedback you are too good that's we all feel
@jesunsjs
@jesunsjs Жыл бұрын
just got to your channel, great work fam 🙏
@suresh85nit
@suresh85nit 7 ай бұрын
I subscribed , thanks a lot for all.
@tulasiramsunkara
@tulasiramsunkara 3 жыл бұрын
Excellent explanation... I believe even most of the developers don't know these concepts...
@mateenmansoori6128
@mateenmansoori6128 2 жыл бұрын
Agree.
@kumarinidhi90
@kumarinidhi90 2 жыл бұрын
Nice series.. Please bring similar series for spring boot as Spring boot interview questions and answers.
@karthickn956
@karthickn956 Жыл бұрын
Thank you very much Abhilash
@lalit28689
@lalit28689 2 жыл бұрын
Thank you...so much 🙏🏻🙏🏻🙏🏻
@rb1239978
@rb1239978 3 жыл бұрын
great explaination :)
@christiangyaban9666
@christiangyaban9666 2 жыл бұрын
Excellent work 👏
@NITISHKUMAR-nx9mk
@NITISHKUMAR-nx9mk Жыл бұрын
Very Nice Explanation!
@akashsangle327
@akashsangle327 Жыл бұрын
Thanks Abhilash
@anirudhwahurwagh7159
@anirudhwahurwagh7159 Жыл бұрын
thank you for awesome content
@naveenchandra6651
@naveenchandra6651 Жыл бұрын
Mind-blowing content ♥️
@akshaybhujbal6795
@akshaybhujbal6795 3 жыл бұрын
Learned something new today
@ravigarg6521
@ravigarg6521 3 жыл бұрын
Thankyou so much for this I never thought I am able to learn hashmap and String its really helpful watchin your video give me confidence and the best part is that , that I now the answer before you explain it , though right know I am not good in coding but I am happy at least I know the concept . I have one request can you create a video on Thread or if there is any video link for the same
@Shivaaayy
@Shivaaayy 2 жыл бұрын
Awesome tutorials...👍
@biswajitprusty9040
@biswajitprusty9040 2 жыл бұрын
bhai maza asigala video dekhi masth achi ❤❤❤
@vishnupriya739
@vishnupriya739 2 жыл бұрын
thanx....a lot
@reasonbehindeverything
@reasonbehindeverything 3 жыл бұрын
very good explanation sir
@navneetsingh9555
@navneetsingh9555 2 жыл бұрын
Just subscribed your chanel.. it is too much helpful for me.. Thanks Abhilash
@SriHariChukka1210
@SriHariChukka1210 2 жыл бұрын
Well explained
@Aakashkumar-re7gk
@Aakashkumar-re7gk Жыл бұрын
Kya mast samjhaya 🙏
@varunagrawal5802
@varunagrawal5802 2 жыл бұрын
Thanks🙏
@sohangour9223
@sohangour9223 2 жыл бұрын
Great work..
@ratunawartejas
@ratunawartejas 2 жыл бұрын
Abhilash the way you explaining I just feel like you are my close buddy sitting next to me who explaining me before to go an interview. Cool man.. Thank you BRO❤️
@SeleniumExpress
@SeleniumExpress 2 жыл бұрын
❤️❤️
@ayeshmanthaperera304
@ayeshmanthaperera304 Жыл бұрын
Nice one man
@rituparnadeshpande3821
@rituparnadeshpande3821 3 жыл бұрын
Hello Abhilash , I took on some another youtuber's video first and then when i couldn't understand I watched yours and then found out that, that video was just copied from your video and still couldn't explain it the way you did. Thanks for your spread of knowledge keep it bro 👍🏻
@rituparnadeshpande3821
@rituparnadeshpande3821 3 жыл бұрын
Also forgot to mention, your detailed explanation helps make it simple and please keep having these details as they are necessary for the thorough understanding and hence are not lengthy.
@224sanjeev
@224sanjeev 2 жыл бұрын
Nice work brother
@kavatirajkumar3325
@kavatirajkumar3325 2 жыл бұрын
Excellent bro
@pixo-pixel
@pixo-pixel 3 жыл бұрын
could you make video on thread advance interview questions?
@travelwithus07
@travelwithus07 9 ай бұрын
Good content
@vikaspatilindore
@vikaspatilindore 2 жыл бұрын
very nice sir
@rajneeshraikwar8352
@rajneeshraikwar8352 8 ай бұрын
Thank you Abhilash .You provide very depth knowledge on many topics. Please complete Solid design pattern series. Also put your UPI bar code ,So whoever feel to pay GuruDaxina ,can express gratitude based on his/her capacity.
@pawancricket13
@pawancricket13 3 жыл бұрын
You are a kind of bahubali in java
@ompalsingh8409
@ompalsingh8409 Жыл бұрын
great explanation. I have question If two object have same hashcode like 111222 then it will go same bucket ok then how get() method will work. and another how to resolve hashcode Collision.
@nguyenquan4836
@nguyenquan4836 Жыл бұрын
🎉🎉🎉
@muralitekumatla4699
@muralitekumatla4699 2 жыл бұрын
Hi Abilash, what is the use of overriding super class getName() method in subclass? without overriding this also we can be able to break the behavior.
@jainlove
@jainlove 3 жыл бұрын
Sir thank you so much for this ... Can you plsss upload whole series of java 8 ?? I really need it !!
@ashishchoudhary9824
@ashishchoudhary9824 3 жыл бұрын
Go and search Java Techie channel. There you see Java 8 playlist. He explained very well all the concepts.
@easysfdc
@easysfdc 3 жыл бұрын
Go for Durga lectures
@SeleniumExpress
@SeleniumExpress 3 жыл бұрын
@@ashishchoudhary9824 yes,I do agree. Basant is a nice guy ! I surely recommend you to Check his videos. He makes awesome Contents. @all I do encourage you guys to follow other KZbinrs Java8 contents instead of waiting for mine. As someone mentioned, already there are java 8 contents available on Durgasoft and Java Brains as well ! All these people are best on youtube, and please consider utilising the resources available. Happy learning 😊❤
@ashishchoudhary9824
@ashishchoudhary9824 3 жыл бұрын
@@SeleniumExpress So nowdays good Java community we have, where all the good content creators supports other content creator. And now this community should grow so that new students can get benefit.
@mateenmansoori6128
@mateenmansoori6128 2 жыл бұрын
@@easysfdc agree
@rohitsharma-xt8qe
@rohitsharma-xt8qe 2 жыл бұрын
Hi Abhilash at 44:05 , Why you have overriden getName methods of student immutable class ? You have not used in the main class ?
@kashishgarg4011
@kashishgarg4011 Жыл бұрын
if we make the get method as final and also equals and hashcode method as final then do we have the need to make the class final?
@shivanandpatil9906
@shivanandpatil9906 7 ай бұрын
What if we re-initialize the same existing object instead of setting a value like below student = new Student("XYZ") This returns null when the get method is called.
@Anand-07
@Anand-07 Жыл бұрын
I have faced one question and in confusion with the explanation that I can think of. If I am using String property inside a Immutable class is it mandatory for that property to make it final? because as we know String is Immutable itself so why are we using final with the String property or as a matter of fact with any Immutable property that we are using inside our custom immutable class. In search of an answer
@babum6194
@babum6194 3 жыл бұрын
👍
@josecarlosaranaluyo5491
@josecarlosaranaluyo5491 2 жыл бұрын
@seleniumExpress I hope you can reply this: When you do Student.setname("otherName") you are creating a new string right? Because the first string Is inmutable. Please Let me knw
@vishalthapa1440
@vishalthapa1440 3 жыл бұрын
why we need to declare class members as final instead of just removing setter method in that case also we cannot set value to members since there are no setter methods.
@puneetsaneja3007
@puneetsaneja3007 Жыл бұрын
If we dont give equals and hashcode method in FakeStudentMutable class, things are working. How ?
@TravelwithJay-rc6zz
@TravelwithJay-rc6zz Жыл бұрын
Interviewer asked me if I will put map.put(null, 1) twice, then when I will try to get the value using null key, what will be the output?
@Krishwithniece
@Krishwithniece Ай бұрын
Last one will come output cause of override null key and value.. It will store 0 th bucket only..
@widethinking5389
@widethinking5389 Жыл бұрын
Please put java8 features video
@PraveenKumar-vh2qm
@PraveenKumar-vh2qm 3 жыл бұрын
How Final class double extends Number class?
@kostadani2022
@kostadani2022 3 жыл бұрын
A final class can extend another class but a final class cannot be extended. So you can extend public abstract class Number(not final), but you can't extend public final class Double because it's final
@nguyenquan4836
@nguyenquan4836 Жыл бұрын
Waiting for abstraction from oop.
@khushbuchoudhary8005
@khushbuchoudhary8005 Жыл бұрын
Why all wrapper classes are immutable ? This question was asked in one of my interview, Please help me with the same. Thanks in advance :)
@Krishwithniece
@Krishwithniece Ай бұрын
Everytime can store data into different memory location once modify or add data 😊
@Krishwithniece
@Krishwithniece Ай бұрын
That is mutable whereas immutable doesn't change state or value
@pawancricket13
@pawancricket13 3 жыл бұрын
#Interview ques nagarro last round - difference between arraylist and linkedlist - difference between sleep()and wait() - difference between race condition and deadlock - why we use synchronised on block when we can use it on method - why we use serialization - how we validate path in java - classnotfound vs classdefinitionnotfound - count num of zeroes in binary represntation of a number - checked and unchecked exceptions - given arraylist get unique elements and maintain the order - real life example of linkedlist - clonning concept in java - ways to create object in java - does applying synchronised on a method solve race condition problem if method has a static variable ? - worked on azure? - what all we need to consume REST APIs provided by third party service - how to make class immutable
@Salimsh12y
@Salimsh12y 3 жыл бұрын
Thanks for sharing👍
@pawancricket13
@pawancricket13 3 жыл бұрын
@@Salimsh12y will share for the 1st round also :)
@jainlove
@jainlove 3 жыл бұрын
Thank you for sharing :)
@dineshkm7832
@dineshkm7832 2 жыл бұрын
Will request to go bit fast .. do not repeat same statements again n again ..
@shubhamthakare7694
@shubhamthakare7694 3 жыл бұрын
Is Priya is your GF or Wife?
@zeeshankhursheed3536
@zeeshankhursheed3536 3 жыл бұрын
bhai tum kitte mote hogaye 😂
@ganeshk8682
@ganeshk8682 2 жыл бұрын
concepts is good but yaar struggling to explain in English? try cambly..
@yatendra__singh
@yatendra__singh 2 жыл бұрын
Just awesome explaination 👏👏
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 10 МЛН
Why String is popular HashMap key in Java?
16:53
Naveen AutomationLabs
Рет қаралды 15 М.
Top 30 JAVA Interview Questions and Answers for Beginners
1:25:45
Interview Happy
Рет қаралды 12 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН