Java HashMap 🗺️

preview_player
Показать описание
Java hashmap tutorial explained

#java #hashmap #tutorial
Рекомендации по теме
Комментарии
Автор

import java.util.HashMap;

public class Main {

public static void main(String[] args) {

// HashMap implements the Map interface (need import)
// HashMap is similar to ArrayList, but with key-value pairs
// stores objects, need to use Wrapper Class
// ex: (name, email), (username, userID), (country, capital)

HashMap<String, String> countries = new HashMap<String, String>();

//add a key and value
countries.put("USA", "Washington DC");
countries.put("India", "New Delhi");
countries.put("Russia", "Moscow");
countries.put("China", "Beijing");


//countries.remove("USA");

//countries.clear();

//countries.replace("USA", "Detroit");



for(String i : countries.keySet()) {
System.out.print(i+"\t"+"= ");

}

}
}

BroCodez
Автор

Your short and clear explanations helped me a lot! Thank you

kayleighrenner
Автор

One thing that always confuse me more is long explanations, I really appreciate how you make this simple and straightforward

vpaulino
Автор

Hi Bro, hope you're doing well
Your videos and explanations about Java and many other programming languages you have on the channel are excellent, understandable and very helpful.
You make a complicated subject much simpler.
I was wondering if you could add to the playlist, videos that explain the interfaces: List, Set, Map.
And an explanation of their implementers: HashSet, HashMap, TreeMap, TreeSet, SortedMap, SortedSet, etc.

IdoH-vfyc
Автор

Clear explanation as always bro. Thank you this helped me with my assignment.

britneyhanna
Автор

I have been studying Java for 6 months, and my university, as much as the lectures try to help, is absolutely useless, especially for someone like me who suffers from learning disabilities, but your videos are amazing... I wish I found it sooner. They teach me things and help me understand in 1-3 days compared to a month and only half understanding it through my university. Thank you so much! I am been acing my tests with your tutorials xd.

rimarai
Автор

Every time I watch these videos I am reminded that going to school is overrated … if only my teachers are this clear🤧🤧🤧

hermitmobile
Автор

Clear, succinct, and complete. Thank you for that.

chetranqui
Автор

Love from Germany <3
I'm here because I can like your "Full Java Course" just once...

mctinemacrisp
Автор

You make coding easy even though I'm mostly learning in theory and writing on pen and paper

nkatekongobeni
Автор

At 11:11, why does it not list the hashmap in the same order in which it was created? As always, great video. I started at video number 3 and this is number 76. Plan to do them all. Not just watching, but I'm doing them myself. Loving it. Your consistency in how you explain is remarkable.

AdrianTregoning
Автор

I always learn something new from your videos, thank you!

greenrocket
Автор

very happy to see new java tutorials Bro!

sergeyb
Автор

THANK YOU VERY MUCH. YOUR VIDEOS WERE REALLY USEFUL FOR BEGINNERS LIKE ME. Once again, thanks, Bro.

huyoan
Автор

That was what I really need to understand! Hashmap in java!

girl
Автор

Thank you for this video.
Very clear and straight forward

justinbanza
Автор

When i first heard about Sets and Maps i always thought i'd never use those but they are, in fact, actually easier than actual arrays, i'm kinda mind blown.

honkhonkv
Автор

Tqs for cleaning my mind with HashMap doughts😊😊

sureshponna
Автор

I like your time traveling, :D. Thanks for the videos

lamias
Автор

Thank you. Your videos deserve way more atention!

badeaadrian