Java collections interview questions | Why HashMap Keys are Immutable? | Immutability & HashMap
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] https://www.youtube.com/watch?v=CojCE-ojdGY&list=PL3NrzZBjk6m9do1opOKwx_C7d2HRJzpwG 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. https://www.youtube.com/channel/UCpUYkSDJpHug-vfC5S-NXRA?sub_confirmation=1 #CoreJavaInterviewQuestion #FAQForfreshers #FAQForExperienced More core java interview questions : Why String is immutable? https://www.youtube.com/watch?v=r9tnet8I8VE&t=341s String Hashcode caching internally. Hashcode caching for immutable classes (important) https://www.youtube.com/watch?v=wytkyBx4JIc&t=543s java interview questions and answers for experienced / Freshers [playlist] https://www.youtube.com/watch?v=Ud0zfImgbYw&list=PL3NrzZBjk6m8rEJ4O6Kpk_i1Ah8Le5Od- For more courses visit https://www.seleniumexpress.com Any time you are getting stuck with issues, Feel free to ask for support. You can send mail to [email protected] you can ping me on my Facebook page https://www.facebook.com/seleniumexpress Make sure to join my private Facebook page (Ask me here) “SeleniumExpress - Support” https://www.facebook.com/groups/187000222361579/ you can ask for support in my website forum https://www.seleniumexpress.com Follow me on Insta https://www.instagram.com/selenium_express/ Music : ————— credits : - (channel intro) Adventures by A Himitsu https://soundcloud.com/a-himitsu Creative Commons — Attribution 3.0 Unported— CC BY 3.0 http://creativecommons.org/licenses/b... Music released by Argofox https://youtu.be/8BXNwnxaVQE Music provided by Audio Library https://youtu.be/MkNeIUgNPQ8
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.