All language subtitles for 005 HashMap_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

The hash map is another useful collection type.

Array List and Hashmat are collection types, the main differences, every entry in an array list is

one value.

Every entry and a Hashmat is a pair of data.

In this lesson, you will learn to use Hashmat.

Inside your Java bootcamp, resources open up the folder for this lesson by following this path.

A hash map stores key value pairs.

The hash map is useful when there's parity between data, every entry and a hash map is a key value

pair.

Every key is like a variable that points to a value, for example, short is 499.

Pens are twelve ninety nine and shoes are twenty three ninety nine.

To create a hash map, you need to write the class type hash map and inside a generic the find that

type of each key, the type of each value.

And remember that generics do not accept primitive types.

And the third step is to make space for a new object of the heightmap class.

All right, inside key values Java, there are two arrays, one is an array of vegetables, the other

is an array of prices.

There is parity between each element in both the race.

So instead of having to erase create a new object of the Hashmat class.

Every key in the hash map is a string, and each value is going to be a double.

And I'm going to call the heightmap items.

Hash maps have a method called put, and you can use it to put an entry into the hash map.

Inside main, we're going to put three entries into the hash map.

The first entry we're going to put is cauliflower with a price of four point ninety nine.

This looks a lot better to me.

I'll play some breakpoints and run the debugger.

And as you can see, every entry in the hash map is a key value pair.

Hazmats also have a method.

Get allows you to access a value from the hash map using its key.

So inside mean I can get the price of cauliflower.

I can get the price of spaghetti squash and I can get the price of parsley.

I'll print each price.

And run the code.

And as you can see, get returns, the price of each key.

Hash map entries don't have an order when you add a new entry, it's placement is random.

That's why house maps don't have an index number, you can't index a value in a Hashmat.

You can only get a value using its key.

So inside key values that Java, I can run through every entry in the hash map using for each.

For each expecta lambda expression, the lambda for this, for each receives every key value pair.

And once again, an arrow points to a block of code where we can just print.

Kee Colon.

Followed by the value.

You'll notice they appear in a random order, we added spaghetti squash second, but it appears last.

Put can add or update an entry.

It adds an entry if the key doesn't already exist.

It updates an entry if the key already exists.

Inside Kivel Java, if you add another entry where the key is partially.

It's just going to update the price for Pursley.

There you go.

Now it's three ninety nine.

Let's recap in this lesson, you learn to create a hash map.

And a hash map is useful when there's parity between data, every entry and a hash map is a key value

pair.

You can use the put method to add a new entry or update an existing one.

Finally, hash maps don't have an order, so you can't index a value from a hash map, but you can use

the get method to get a value based on its key.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.