HashMap Java Tutorial #50

  Рет қаралды 412,505

Alex Lee

Alex Lee

Күн бұрын

Пікірлер: 432
@alexlorenlee
@alexlorenlee 11 ай бұрын
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
@latedeveloper7836
@latedeveloper7836 3 жыл бұрын
Exemplary tutorial, as always. Timings + my notes below that might help others: 1:45 An example of how hashmaps can help 2:05 Creating and naming a hashmap 2:40 How to add values to a hashmap using the .put method 3:52 Why you should use a generic and data type for type safety when creating a hashmap + how to add this 4:25 Why you need 'Integer' [i.e. class type] for a hashmap (can't take primitive 'int' type) 5:00 Test print of hashmap (default output displays in set notation) 5:30 Calling a specific value from the hashmap - .get call 5:50 Start of more advanced hashmap functions - user + password example 6:15 Creating a hashmap with specific type for type safety 6:33 How to add users and passwords - .put method 7:32 How to remove elements from a hash map - .remove method 8:08 Check if hashmap contains a specific value - .containsValue 8:42 Difference between Values and Keys in a hashmap using .containsValue and .containsKey method calls 9:23 How to replace a value (password) - .replace method 10:10 Key difference between hashmaps and array lists - hashmaps don't have a specific order whereas array lists have an index 11:00 Simple summary of what a hashmap is
@InkMask
@InkMask 2 жыл бұрын
:D
@zorienx
@zorienx 2 жыл бұрын
Thank you for this!
@burakgul2136
@burakgul2136 5 жыл бұрын
This video is awesome. Your english is clear and understandable. I like it 👍
@7own878
@7own878 4 жыл бұрын
Here, after concentrating to get what was said in the Indian accent, one time too often.
@bobbobertson9063
@bobbobertson9063 3 жыл бұрын
@@7own878 it gets tiring to heat the same accent from computer science tutorials all the time
@rxtechandtrading
@rxtechandtrading 2 жыл бұрын
I know...we can actually understand this man, unlike all the other idiots who make tutorials
@josephsanchez2061
@josephsanchez2061 4 жыл бұрын
I don't know if you'll see this since it's an older video but you're probably the only programming tutorial KZbinr that's relatable. The rest of them are super smart and do know what they're talking about (so are you obviously) but for some reason, you admitting that a certain topic or part of a topic confuses you helps me understand the material more when you explain it.
@unitedtomato5444
@unitedtomato5444 3 жыл бұрын
He understands what not knowing something was like. I really appreciate that!
@ulanalibek7225
@ulanalibek7225 5 жыл бұрын
Yes the name itself used to make me think that this HashMap thing is one of the most complicated things in Java. Your tutorial made it look like a piece of cake. :) Thanks! keep up the good work.
@waterflowzz
@waterflowzz 3 жыл бұрын
It’s not complicated to use but the implementation of a hash map is a bit more complex than just a 2d array. Hashmaps use a hash function to store the key value pair so that it doesn’t have to go through the whole hashmap using a for loop, Big O(n), when looking for a key. The hash function lookup makes it so that it is Big O(1). In other words the hash function makes it so that the lookup of a key is faster.
@enochphetteplace8729
@enochphetteplace8729 5 жыл бұрын
This is actually the best description of HashMaps I have seen yet
@luka-j-ovanovic
@luka-j-ovanovic 4 жыл бұрын
For anyone with a python background, hashmaps are the same as dictionaries.
@murkkz1679
@murkkz1679 2 жыл бұрын
Thank you bigman
@MANOJKUMAR-mb2uw
@MANOJKUMAR-mb2uw 2 жыл бұрын
Yes
@nathaniepeter5707
@nathaniepeter5707 2 жыл бұрын
Thank you
@mir.9805
@mir.9805 2 жыл бұрын
Ah the more you know.
@brandonstrobel1365
@brandonstrobel1365 2 жыл бұрын
Saved me 11 minutes !
@gnovakov
@gnovakov 3 жыл бұрын
Love your tutorials, so clear and concise! you just get to the point and it just makes sense!
@fakejake8723
@fakejake8723 3 жыл бұрын
Seriously you taught a semestre worth of studies under 20 min. I thank you. I couldn't figure this out until your video. Please make more videos on data structures. I get your explanations.
@abdullahmamun1823
@abdullahmamun1823 4 жыл бұрын
just as simple as u.thanks.it is a one kind of social work.we need people like u.
@bieberfever161098
@bieberfever161098 3 жыл бұрын
I finally understood, thanks for the video!! Btw the sound of your keyboard is so satisfying😨
@danishuddin9752
@danishuddin9752 Жыл бұрын
The UI you created it beautiful!
@shirinall9080
@shirinall9080 3 жыл бұрын
This young dude is my favorite tutor in youtube !!
@lukedavis6711
@lukedavis6711 4 жыл бұрын
Its called HashMap because it's a data structure that uses the hash function to generate a mapping of keys and their corresponding values.
@skat4
@skat4 2 жыл бұрын
Been studying for my Software Engineering Interview, and these videos are so helpful!
@h0tar
@h0tar 4 жыл бұрын
That keyboard is amazing! Thanks for clearing up hashmaps for me, makes it easier when we get there at school.
@yogeshpandey9549
@yogeshpandey9549 3 жыл бұрын
the most simplified yet extremely informative tut on hashmap. great work m8 :)
@abhi.marc90
@abhi.marc90 3 жыл бұрын
Wow thank you I was unable to understand hash maps until I stumbled upon your video. Thank you :)
@biggie2123
@biggie2123 3 жыл бұрын
I finally understand HashMaps. Thank you so much!
@kzfingerprint
@kzfingerprint 3 жыл бұрын
Your videos are amazing! Thank you!!! You break down complex things so that I can better understand what's actually going on
@MaximumJoy
@MaximumJoy 5 жыл бұрын
This is so helpful. Your explanations and presentation are perfect.
@biscuitbutb4106
@biscuitbutb4106 2 жыл бұрын
These tutorials are awesome. You make java look so easy. Thanks for these easy tutorials!!
@mageshsankaran6521
@mageshsankaran6521 3 жыл бұрын
you explained it effortless
@basithtafadher8743
@basithtafadher8743 3 жыл бұрын
Teaching method really awesome. Wish your good health.
@supriyagupta922
@supriyagupta922 3 жыл бұрын
lovely dialogue delivering, excellent quality of video, concepts told in lay man terms. enjoyed and learnt. keep up the good work Alex. :)
@johncsanchez9763
@johncsanchez9763 4 жыл бұрын
great tutorial. I understand it alot than my teacher. Thanyou! post more java tutorial
@johnvishwas9117
@johnvishwas9117 3 жыл бұрын
You're the best coding tutor!
@miledsahar2840
@miledsahar2840 Жыл бұрын
i don't usually write comments but your tutorials are so good and helpful. keep going !
@psalkin
@psalkin 2 жыл бұрын
Best hashmap tutorial ever!
@mflr121
@mflr121 3 жыл бұрын
Excellent video, I understood everything. Thank you!
@lukedavis6711
@lukedavis6711 4 жыл бұрын
In the statement 'int a = 10'; 'a' is not a String but a non-static field.
@victorwolff
@victorwolff 4 жыл бұрын
What type of keyboard is that? The sound is so satisfying XD
@skyeleake9943
@skyeleake9943 3 жыл бұрын
looks like a HHKB TypeS (torpre silent 45g switches)
@geromemanicia3809
@geromemanicia3809 4 жыл бұрын
This was most helpful. I also want one of your keyboards but for now I'm gonna stay with my measly CTRL from drop.
@PratyushMishra7
@PratyushMishra7 4 жыл бұрын
instead of typing system.out.println() use sout followed by ctrl+space or cmd+space
@sandianexpress1198
@sandianexpress1198 4 жыл бұрын
or just do sysout followed by ctrl + space.
@usertyfoon
@usertyfoon 2 жыл бұрын
That was great! Many thanks, bro!
@fabianmaisch2423
@fabianmaisch2423 3 жыл бұрын
Very nice man! Helped me a lot👍🏼
@cacmang42
@cacmang42 4 жыл бұрын
you're a great teacher, keep going 💪
@ljka
@ljka 3 жыл бұрын
Just like any other concepts, we learn basic of Java and integrate those knowledges to better understand more complex concepts. HashMap is named as it is because it possesses properties of Map and uses hashing logic in organizing and structuring data. Data Structure ✌🏼 Cool vid
@ahmediqbal9869
@ahmediqbal9869 2 жыл бұрын
for anyone that is wondering, it is called a HashMap because it uses a technique called hashing.
@groupcoop409
@groupcoop409 5 жыл бұрын
Best hashmapping tutorial! super easy to understand well delivered! more tutorials to come THANKS! :D
@testtester5693
@testtester5693 3 жыл бұрын
Thanks dude! Really good !!
@adultishgambino8713
@adultishgambino8713 4 жыл бұрын
Such a good tutorial, straightforward and useful
@thischannelisnomore1283
@thischannelisnomore1283 5 жыл бұрын
Most useful on teaching me hashmaps, Thank you so much!
@jong.4864
@jong.4864 4 жыл бұрын
This helped me a lot, thank you Alex!
@helalali9799
@helalali9799 3 жыл бұрын
i am an indian and i actually dont watch englishmen video because i couldnt get the pace of english, but you are the 1st youtuber whose video i watch very confidently. my request is that can you start a series to make people competetive coder from 0 to hero.
@jakubsowikowski9654
@jakubsowikowski9654 5 жыл бұрын
Awesome video!
@andreloureiro4447
@andreloureiro4447 4 жыл бұрын
Simply and great, thanks
@Big-Timbo
@Big-Timbo 4 жыл бұрын
So I'm not entirely sure, as I'm learning CS myself. However, I believe it's called Hashmap, because it seems the main use is for usernames and passwords. a typical way that passwords are stored securely is to create hash values (essentially an encrypted version of that same password) and have those stored in a database instead of the plain text. It would make sense to me that it's called hash map as you're creating a link between what could be used for user's hashed passwords linked to the user account.
@NilEoe
@NilEoe Жыл бұрын
My personal (unverified) theory is that hasmaps are called that way because the hash symbol # could represent the idea of 2 dimensions (grid) opposed to an array which would be a single line
@ayoubrayanemesbah8845
@ayoubrayanemesbah8845 2 жыл бұрын
hash is an arbic word تهشير which mean make a marke on something
@aliciaabella7307
@aliciaabella7307 3 жыл бұрын
Great Great Great tutorial !!
@shantanushende6
@shantanushende6 4 жыл бұрын
Amazing Video!!!!!!! keep going!!! can't wait to learn more.
@bafers1
@bafers1 3 жыл бұрын
Really like your videos, thanks for putting them up! Quick question though.... why do you not use your Mac keyboard :) ?
@andywei5518
@andywei5518 4 жыл бұрын
very friendly for beginner :)
@aydinvahdat7816
@aydinvahdat7816 4 жыл бұрын
I swear to god this is the last one I’m gonna watch today
@michaelsd28
@michaelsd28 3 жыл бұрын
best teacher ever
@carlosblanco1574
@carlosblanco1574 3 жыл бұрын
Really good video
@yerffej370
@yerffej370 2 жыл бұрын
Bro why does KZbin keep recommending this. Fine! I’m here. I clicked it
@Greenmarty
@Greenmarty 11 ай бұрын
2:00 It's called HashMap because it uses hash key to access values in the background and implements Map interface and extends AbstractMap class. If you would write your custom HashMap it would be array of linked lists. Length of the array would not be equal to number of stored key-value pairs. Instead array stores linked list heads, where each list node has hash key, value and points to next node. Hash key is hash version of the key you inserted. To access the value nodes are iterated until hash key matches.
@nobel978
@nobel978 5 жыл бұрын
Thank you so much, you're an awesome teacher.
@marta9385
@marta9385 3 жыл бұрын
What keyboard are you using? I like the mechanical keyboard but I don't know what one I should buy. Thank you for your video it´s really useful!
@JoshuaPack
@JoshuaPack 3 жыл бұрын
So, in PHP, is a hashmap just an Associative Array?
@sk8terkyd326
@sk8terkyd326 3 жыл бұрын
this functions almost the same as dictionaries in python right?
@miriamarelymartinezcampos238
@miriamarelymartinezcampos238 2 жыл бұрын
I loved the names haha "happy" and "fun", thank you so much for your explanation you made easier to understand
@sunmit_productions
@sunmit_productions 4 жыл бұрын
Thank you very much Alex! I was struggling with HashMap for all day, and your video really helped!!
@lesliecastelan7814
@lesliecastelan7814 3 жыл бұрын
thank u for ur service to my grade
@RicardoPires2023
@RicardoPires2023 4 жыл бұрын
Hello Alex and thank you very much for your videos. They are awesome! For this video in particular, it was not clear to me what are the differences of HashMap and ArrayList, and how too choose which to use. Thank you again!
@Oleks_krulikovskyi
@Oleks_krulikovskyi Жыл бұрын
Thank you ❤
@Falzer
@Falzer 2 жыл бұрын
So for Python, its dictionary for javascript, its Object literal for java its hashmap?
@ovey2214
@ovey2214 3 жыл бұрын
Thank you for explaining things so well. You make otherwise complicated things sound so easy to understand. Bless you brother!
@glorysonhorace3265
@glorysonhorace3265 2 жыл бұрын
Very educative
@preetamackermann3038
@preetamackermann3038 3 жыл бұрын
You make everything so simple. Thanks a lot !
@ElColombre27360
@ElColombre27360 3 жыл бұрын
Nice video, but I don't agree with the explanation approach. I think that the best approach is using the math concept of function: that's exactly what a map is.
@DeepakSingh-vh7yx
@DeepakSingh-vh7yx 3 жыл бұрын
every topic to him is pretty confusing
@SuhasGowda4695
@SuhasGowda4695 5 жыл бұрын
Thank you for the video. This covers almost everything for novice learners.
@afifkhaja
@afifkhaja 5 жыл бұрын
Terrific!
@Universestyle
@Universestyle 4 жыл бұрын
With my software setup, I have to name the public class something else then "HashMap", then it works.
@uttamsingh5465
@uttamsingh5465 3 жыл бұрын
Love from Nazia Farheen ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
@ItsAnu276
@ItsAnu276 3 жыл бұрын
U are just aswwm Lee ty mate👍
@Brlitzkreig
@Brlitzkreig 2 жыл бұрын
So glad to see how your channel has grown over time. You really deserve it!
@simonescarantinotorregross9182
@simonescarantinotorregross9182 3 жыл бұрын
hashmap is basically a library of method, right?
@321jeR
@321jeR 4 жыл бұрын
Hye Alex, im love your tutorial
@haziq903
@haziq903 3 жыл бұрын
Can you do tutorial doing HashMap without importing
@nyxielia
@nyxielia 4 жыл бұрын
Thank you so much!! Finally a good explanation! Can you please make more videos on Data Structures :-)
@itsofficial5381
@itsofficial5381 5 жыл бұрын
Which softwares are you using to design and edit your videos ? Please please tell me....i like you design tooooooooooooo much.. please tell me ?😥😥😥
@khushiozha9370
@khushiozha9370 3 жыл бұрын
what more can we learn if we have already done python,js,sql and html currently am doing java.... what are more languages we can learn plzzz guide me sir ... I am interested in programming currently am in 10th standard
@VIGNESHWARANSita
@VIGNESHWARANSita Жыл бұрын
can u give a content for entry set in map
@darthpepe6761
@darthpepe6761 4 жыл бұрын
I was working on a master order assignment where we had to make a map of cookie variety and its numBoxes sold. This video was very helpful since he basically said, here is the assignment. You're gonna need to know Maps. I appreciate the tutorials. Thank you so much.
@iwatchedthevideo7115
@iwatchedthevideo7115 5 жыл бұрын
Quality stuff! Will sub for more!
@khyrzzxujhynnefanega9073
@khyrzzxujhynnefanega9073 3 жыл бұрын
Your videos are helpful,,but my brain is a bit slow so uhmmmm---- thank you so much I learned something today.
@goddnny3320
@goddnny3320 5 жыл бұрын
Good video :) Is it possible to make a hashmap with 3 or morge strings?
@alexlorenlee
@alexlorenlee 5 жыл бұрын
Hacker-Report yea totally you can add as many as you want
@c7iogamer264
@c7iogamer264 Жыл бұрын
thank you for making coding tutorials that arent mind numbing
@ishowLow
@ishowLow Жыл бұрын
macbook gay :(
@saucer79
@saucer79 Жыл бұрын
fax😩
@aiandesilva6416
@aiandesilva6416 3 жыл бұрын
The amount of times this guy has saved my GPA is crazy
@haythembargaoui4813
@haythembargaoui4813 4 жыл бұрын
thank you
@Seebzters
@Seebzters 4 жыл бұрын
So, why is it unsafe to replace a key in a HashMap?
@jesthenoob6514
@jesthenoob6514 4 жыл бұрын
Cant we use Arrays to compile the things?
@Calupp
@Calupp 3 жыл бұрын
Mmm that keyboard thoncc af
@mdhossain529
@mdhossain529 4 жыл бұрын
You are great my son. May God Bless you.I am 48 but steel I am your student. Thank you very much.
@patrickaero1767
@patrickaero1767 4 жыл бұрын
Are HashMaps the same thing as HashTables? Do you think it is possible to do quadratic and linear probing using HashMaps?
Simple Java Program In Eclipse - Fart Generator #51
12:50
Alex Lee
Рет қаралды 15 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1,1 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 35 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 5 МЛН
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 11 МЛН
How HashMap works in Java? With Animation!! whats new in java8 tutorial
15:29
Ranjith ramachandran
Рет қаралды 1 МЛН
HashSet In Java Tutorial #52
12:20
Alex Lee
Рет қаралды 112 М.
Return Statement in Java #27
14:38
Alex Lee
Рет қаралды 277 М.
Map and HashMap in Java - Full Tutorial
10:10
Coding with John
Рет қаралды 578 М.
Getters and Setters Java Tutorial #84
14:12
Alex Lee
Рет қаралды 499 М.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 220 М.
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 594 М.
Hash Tables and Hash Functions
13:56
Computer Science (Kevin Drumm)
Рет қаралды 1,6 МЛН
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,8 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 35 МЛН