RUVIDEO
Поделитесь видео 🙏

How HashMap works internally || Popular java interview question on collection (HashMap)

In this tutorial, we are going to learn how hashmap works internally.This is a very popular java interview question from the collection framework and been asked so many times to check candidates understanding on Map collection.

I am going to cover three things in this series of tutorials which will cover a hashmap internal implementation.

1) We will see a detailed overview of how a map works internally when we use map.put(Key k, Value v )

2)Once we will have an overall idea we are going to debug
everything that we learned in this tutorial

3)In the last tutorial of this series, I will cover how the get method works internally ( map.get(Key K) )

So when we create a map object internally an array of buckets will be created with a size 16 (if we use the default constructor.)Then when we use the map.put method, internally the hashcode and the index will be calculated for the key and the key will be stored in a specific index.

In case of a hash collision, then the key with the same hashcode is going to be stored in the same index as each bucket is a node or a linked list.

Inside each bucket, four things are going to be stored as a form of a linked list.They are hashcode, key, value and the next (which hold the address of the next node with the same hashcode).

So lets understand everything diagrammatically because this is one of the very popular hashmap interview questions.So please put this question on your to-do list and better be prepared for it.

“How hashmap works internally in java with example"

subscribe to my channel by clicking on the link below.

https://www.youtube.com/channel/UCpUYkSDJpHug-vfC5S-NXRA?sub_confirmation=1

Stay tuned and like my Facebook page for more.

https://www.facebook.com/seleniumexpress/


Music :
-----------
credits : -
1)
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

(intro)

2)
NCM Epic Music Ender Guney
https://www.youtube.com/c/NCMEpicMusic

-----

intro template :
www.youtube.com/Alexbau01

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How HashMap works internally || Popular java interview question on collection (HashMap)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.