14.11 HashMap and HashTable in Java

  Рет қаралды 668,903

Telusko

Telusko

8 жыл бұрын

Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
Discord : / discord
Complete Java Tutorial : goo.gl/3NaAW1
HashMap and HashTable both implements Map interface.
HashTable is synchronized and HashMap is not synchronized.
HashMap is faster than HashTable.
HashMap, LinkedHashMap, TreeHashMap, HashTable implements Map Interface
Recommend Books :
1. Head First Java : amzn.to/2owFrf0
2. Java Complete Reference : amzn.to/2osY04k
Java and Spring Framework For beginners with Spring Boot : - bit.ly/3LDMj8D
Java Tutorial for Beginners (2023) :- bit.ly/3yARVbN
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Editing Laptop :
ASUS ROG Strix - (new version) amzn.to/2RhumwO
Camera : amzn.to/2OR56AV
lens : amzn.to/2JihtQo
Mics
amzn.to/2RlIe9F
amzn.to/2yDkx5F
Subscribe to our other channel:
Navin Reddy : / @navinreddy
Telusko Hindi :
/ @teluskohindi
Subscribe to the channel and learn Programming in easy way.
Java Tutorial for Beginners : goo.gl/p10QfB
Scala Tutorials for Java Developers : goo.gl/8H1aE5
C Tutorial Playlist : goo.gl/8v92pu
Android Tutorial for Beginners Playlist : goo.gl/MzlIUJ
XML Tutorial : goo.gl/Eo79do
Design Patterns in Java : goo.gl/Kd2MWE
Socket Programming in Java : goo.gl/jlMEbg
Spring MVC Tutorial : goo.gl/9ubbG2
OpenShift Tutorial for Beginners : goo.gl/s58BQH
Spring Framework with Maven : goo.gl/MaEluO
Sql Tutorial for Beginners : goo.gl/x3PrTg
String Handling in Java : goo.gl/zUdPwa
Array in Java : goo.gl/uXTaUy
Java Servlet : goo.gl/R5nHp8
Exception Handling in Java : goo.gl/N4NbAW

Пікірлер: 254
@spacetime_wanderer
@spacetime_wanderer 5 жыл бұрын
Great going sir! I tend to first search your channel for things I am looking for before looking elsewhere. Keep up the great work, sir.
@Avaylia
@Avaylia 5 жыл бұрын
Incredibly helpful video! Super clear and concise :)
@tmzpanda
@tmzpanda 4 жыл бұрын
3:05 HashMap, LinkedHashMap, TreeHashMap, HashTable implements Map Interface 4:55 "keySet" method 5:31 "Map.Entry(I) and "entrySet" method 7:59 LinkedHashMap, TreeHashMap vs HashMap
@TechProgrammingIdeas
@TechProgrammingIdeas 4 жыл бұрын
Hai Visit my hash map video
@Affliction604
@Affliction604 5 жыл бұрын
That's one of the best tutorials i've ever watched
@alextrex3975
@alextrex3975 6 жыл бұрын
very helpful, thank you for the effort you've put into these videos
@shriramjadhav7891
@shriramjadhav7891 Жыл бұрын
Thank you so much for such partical and to the point explanation. Thank you so much over again.
@ashwiniv7053
@ashwiniv7053 4 жыл бұрын
Awesome videos, learning Java thru ur videos is a breeze. Small clarification - HashTable is synchronized and shouldn't it be a single thread instead of multiple threads.
@ger1991mess
@ger1991mess Жыл бұрын
You make it look so simple!!! Thank you very much sir.
@maverickmegastar
@maverickmegastar 5 жыл бұрын
🙏 After scanning through a ton of implementations this has to be one of the most concise video on this topic.
@AbdulRizwan
@AbdulRizwan 6 жыл бұрын
the way you teach is really awesome :) very nice work.
@taruntosh7970
@taruntosh7970 4 жыл бұрын
This is the best tutorial in entire internet. Thanks for the effort.
@TechProgrammingIdeas
@TechProgrammingIdeas 4 жыл бұрын
Hello Visit my hash map video
@setudutta3905
@setudutta3905 5 жыл бұрын
You da best... very well explained.
@rukikar5643
@rukikar5643 8 жыл бұрын
Very good explanation. Thank you
@Ketrixx
@Ketrixx 6 жыл бұрын
Great job as always !!!!
@vengateshan7800
@vengateshan7800 8 ай бұрын
The way of explanation is very crystal clear and understandable
@gener6995
@gener6995 4 жыл бұрын
Hi navin, good job....keep up the great work...can you please make a video on internal working of map in Java.
@amolgenius06
@amolgenius06 7 жыл бұрын
in Map.entry , entry is inner class of interface map
@FindARandom
@FindARandom Жыл бұрын
Love telusko since 2019
@muruganpalani2007
@muruganpalani2007 6 жыл бұрын
T hanks boss for the simple clarifications ............
@iskandarzakirov230
@iskandarzakirov230 4 жыл бұрын
Very clear explanation, sir! Great Job! Like + Subscription.
@nagavadlapudi
@nagavadlapudi 5 жыл бұрын
How to print whole key set? - 4:54 What is entry set and how to print it? - 5:31
@shabirafshar9773
@shabirafshar9773 5 жыл бұрын
You made me understand man thank you SIR
@user-sy1xb4uq3q
@user-sy1xb4uq3q 4 жыл бұрын
very helpful,Amazing explain. thank you
@RahulPahuja1991
@RahulPahuja1991 2 жыл бұрын
Thank you so much for this Navin
@hermesmercuriustrismegistu4841
@hermesmercuriustrismegistu4841 3 жыл бұрын
Thx for the valuable information
@rovsenhuseynov8368
@rovsenhuseynov8368 4 жыл бұрын
Amazingly informative video.
@user-xd1pv6ze6x
@user-xd1pv6ze6x 6 ай бұрын
Lot's of thanks dear sir, Awesome videos, learning Java videos is a amazing. Perfect clarification - HashTable is synchronized and shouldn't it be a single thread instead of multiple threads.👍👍👍👍👍👍
@mugdhashrivastava
@mugdhashrivastava Жыл бұрын
amazing explanation. thank you so much sir
@naturefriends3531
@naturefriends3531 3 жыл бұрын
Great explanation, very useful
@mahmudhr2760
@mahmudhr2760 7 жыл бұрын
Excellent example to make it explained.
@faixan13
@faixan13 3 жыл бұрын
We can iterate directly also on entry set rather than saving first in Set. for(Map.Entry i : map.entrySet()) { System.out.println(i.getKey()+" " + i.getValue()); }
@surykaushal2140
@surykaushal2140 2 жыл бұрын
yes you can, he was just making it simpler to every one like if you have map.entrySet() then it can be assign to Set. Also we all can save variable , it was done here for readability
@sreekanthreddy9087
@sreekanthreddy9087 7 жыл бұрын
nice explanation.Thanks for information......
@archerli7257
@archerli7257 4 жыл бұрын
Thank you! Very helpful tutorial
@poojajoshi3174
@poojajoshi3174 3 жыл бұрын
finally my map concept clear thankyou sir :)
@asifkarimbherani6386
@asifkarimbherani6386 7 жыл бұрын
Hey when are you planning to upload the next video to this playlist? So far it was very good and helpful and we are waiting for more videos on collection playlist.
@shubhamjadhav4728
@shubhamjadhav4728 3 ай бұрын
7 years ago u were learning collections just wanna ask how's ur programming going..?
@user-lb1fl7sh8m
@user-lb1fl7sh8m 7 жыл бұрын
you are the best man god bless you
@parshuramrathod1681
@parshuramrathod1681 2 жыл бұрын
Because of you I got placed in compan.thankyou so much
@angelguzman477
@angelguzman477 2 жыл бұрын
Navin, you look so much better now, your English has improved and you explain better, Its amazing seeing how much you have improved
@Sumedh_v1
@Sumedh_v1 2 жыл бұрын
It's a 5 years old video, he's now the knowledge source for crores of developers. Please mind before commenting.
@ravindraprajapati468
@ravindraprajapati468 6 жыл бұрын
this video give very good information about haaaaaaashmap
@soumitramehrotra5547
@soumitramehrotra5547 7 жыл бұрын
sir,is there any way to input the entries at once into a hashmap rather than using put() function for very entry ?Also is there any way to see a particular value, and not all the value in the map.
@kanchapaudukumbura7991
@kanchapaudukumbura7991 4 жыл бұрын
Do you have video about hashtable implementations/functions? (like your videos of linkedlists,ques,stacks) I
@saddamahmad2310
@saddamahmad2310 4 жыл бұрын
thank you very much sir for this video
@soybenh9340
@soybenh9340 3 жыл бұрын
Thank you for the tutorial, am using jdk 8, it doesn't support these data structures :hashtable,hashmap...what should i do?
@Karbonblade
@Karbonblade 4 жыл бұрын
"If you know the key, you will get the number". Well I got arrested instead.
@GaneshKumar-vh4it
@GaneshKumar-vh4it 4 ай бұрын
😂
@madanreddy2322
@madanreddy2322 10 ай бұрын
One thing is wrong here,in hash map multiple threads will work at a time where as in hash table only single thread at a time( you did a mistake in comparison table )
@RahulKumar-de2rw
@RahulKumar-de2rw 5 жыл бұрын
I've seen many tutorial of a Java but this is the best one, sir why don't u start pega software tool?? It is also based on Java,
@algorithmsguide5076
@algorithmsguide5076 5 жыл бұрын
Thank you Sirji !!
@MrRannis
@MrRannis 6 жыл бұрын
Nice, how to get the length of value of a perticuler key?
@Aeizium
@Aeizium 5 жыл бұрын
Awesome video :)
@technical9871
@technical9871 3 жыл бұрын
Nice video . Thanks for very useful information
@srikanthjk9
@srikanthjk9 4 жыл бұрын
Thanks for information. What if we have more than two columns in excel, how to store such values?
@shashgo
@shashgo 7 жыл бұрын
if the keyset is one way of getting all the key value pairs then is there any reason to use the other way of map.entry? If the end result is to get all the key value pairs without individually knowing each key, then what is the need of the map.entry method, and why would they want to ask about that in an interview.
@ShoeibShargo
@ShoeibShargo 2 жыл бұрын
Can anyone tell me, what is this sign ? Is it a paramerter or what?
@mathsforiit-jee9730
@mathsforiit-jee9730 3 жыл бұрын
it was direct in the point .. learned quickly thnx.
@nithyasivaprakasam4925
@nithyasivaprakasam4925 Жыл бұрын
Very clear explanation.. superb.. thank u so much sir.. ur videos are easy to understand even if it is a big thing..
@aishwaryarokade1150
@aishwaryarokade1150 5 жыл бұрын
Nice video ..could you please give an example of hashmap under hashmap
@shaiknagoorvali8983
@shaiknagoorvali8983 6 жыл бұрын
Great tutorial sir
@nayanrajvansh6705
@nayanrajvansh6705 5 жыл бұрын
At 4:04 What would be the output if we execute System.out.println(phonebook.values()).. Will it be sorted if yes then on what basis .. Please explain .Thanks in Advance
@MsWonderlands
@MsWonderlands 6 жыл бұрын
so...for storing key-value pairs, we could very well use Arrays, by storing keys as indices and values as the Array Values. What is so specific about HashMaps?
@thetuchofheart2928
@thetuchofheart2928 7 жыл бұрын
you have some tutorials regarding concurrent collections
@seenu007
@seenu007 6 жыл бұрын
I like your channels name...innovative!
@satyavarmalutukurthi
@satyavarmalutukurthi 7 жыл бұрын
today I learned a new concept
@rajarshibasu007
@rajarshibasu007 3 жыл бұрын
Hello sir what is the meaning of this line please help (although it is not related to this video) : HashSet hs=new HashMap();
@ShaeekhShuvro
@ShaeekhShuvro 7 жыл бұрын
Hello sir do you have video on arraylist?
@channelkerr
@channelkerr 3 жыл бұрын
Is it possible to have a multiple attributes instead of just 1 key to 1 value like a CSV? eg Name, age, weight Bill, 18, 60
@DhrumilShahDOTin
@DhrumilShahDOTin 6 жыл бұрын
ConcurrentHashmap ?
@simm5622
@simm5622 3 жыл бұрын
Thank you 👍
@anupkmr03
@anupkmr03 6 жыл бұрын
Whatever you have explained that is perfectly fine but I have another doubt which is related to memory leak. When we don't implement the equals and hashcode then it takes from object class in that case too it gives us some unique code, So how GC is unable to clean up those unused objects when "get" method called internally then it definitely returns its hashcode and that is a expected case. But this whole scenario is a memory leak problem so please explain this.
@saipoojitha7553
@saipoojitha7553 4 жыл бұрын
Sir,the video really very helpful...I have a doubt...is it possible to map HashMap....
@addicted09111
@addicted09111 7 жыл бұрын
can we give more than one value to a single key ? any method to do that ?
@kalppatil7568
@kalppatil7568 6 ай бұрын
thank u telusko sir --regards from an alien
@prameshkumar4932
@prameshkumar4932 2 жыл бұрын
Naveen, How will we fetch all key and its values using old for loop ? i am trying but not able to do it with normal for loop ? could u please help..
@vishalchawla2660
@vishalchawla2660 4 жыл бұрын
What is the use of e.setvalue("III")??
@nameizdanny
@nameizdanny 6 жыл бұрын
hi sir i am big fan of you,sir can you make a video on what is difference between Hashcode and equals method in collection
@anikevin
@anikevin 3 жыл бұрын
Thank you sir
@rezaurrahman6455
@rezaurrahman6455 3 жыл бұрын
super video. thank you :)
@praveenswarnakar5135
@praveenswarnakar5135 6 жыл бұрын
in your phone book example if i want to have duplicate name then what should be the right way to implement key value pair?
@samk8806
@samk8806 6 жыл бұрын
Duplicate keys are not allowed
@abhinavthakur6780
@abhinavthakur6780 Жыл бұрын
Is there any class called TreeHashMap? I think it is TreeMap only right?
@girjashankar7925
@girjashankar7925 3 жыл бұрын
can you please tell me,why in hashtable ,no null key is allowed?
@dhavalshah3519
@dhavalshah3519 5 жыл бұрын
Its was tough to understand especially entry,but though thank u
@sriramakrishna7188
@sriramakrishna7188 7 жыл бұрын
hello sir, I have a small doubt which is asked by my friend.how can we create an object of HashSet with the help of object of ArrayList. please give me the correct solution.
@mamatanaik9699
@mamatanaik9699 2 жыл бұрын
what is difference between map.keySet() and map.entrySet(),at what condition to use these things
@nancyreva5722
@nancyreva5722 2 жыл бұрын
Is HashMap working single thread? HashMap is unsynchronized right!.. so it's used multithreaded only, but you mention hashmap works with a single thread in the hashmap and hashtable difference.. if it is right you mentioned, please explain.
@jamshedkarimnazarov7610
@jamshedkarimnazarov7610 4 жыл бұрын
Can we not create an ArrayList of objects?
@chereddy9833
@chereddy9833 Жыл бұрын
hardwork defines the sucess like the above example!!!!
@Arrezzz
@Arrezzz 6 жыл бұрын
thank you.
@mackensonreginaldmichel399
@mackensonreginaldmichel399 4 жыл бұрын
Hello. Thanks for the awesome tutos. Is there a difference between: Entry and Map.Entry?
@TechProgrammingIdeas
@TechProgrammingIdeas 4 жыл бұрын
Hai Visit my hash map video
@shubhamgoswami3722
@shubhamgoswami3722 5 жыл бұрын
Plzzz make the videos for hash maps and hashtables in c++
@supratimmukherjee2427
@supratimmukherjee2427 7 жыл бұрын
can you plz send me the link of the next practicle video
@anbarasusubramaniyan693
@anbarasusubramaniyan693 7 жыл бұрын
could you pls explain how to add list into hashmap !!!! and as well as how to add the hashmap inside the hashmap???
@RahulKumar-de2rw
@RahulKumar-de2rw 5 жыл бұрын
Good one sir
@satyavarmalutukurthi
@satyavarmalutukurthi 7 жыл бұрын
thank u so much
@BuffaloBlack
@BuffaloBlack 2 жыл бұрын
Fantastic
@swamy7260
@swamy7260 Жыл бұрын
hi can you explain about HashSet
@hamdamboyurunov6034
@hamdamboyurunov6034 5 жыл бұрын
good thanks sir
@maweryoutube9852
@maweryoutube9852 5 жыл бұрын
YOU ARE AMAZING AS ALWAYS ^_^
@priscilla00167
@priscilla00167 8 жыл бұрын
Hi, Ive got this assement for the college: I have to implement a system for viewing and updating of student data. This data is giving by a .txt, for example: 201504123|Carla Arias|IN-TEL|20|10|2|6.8 201402947|Paul Zambrano|IN-TLM|21|18|0|8.1 201508364|||||| 201502342|Ivan Torres|IN-CC-ST|19|6|0|7.5 201201723||||||, my question is: Which method is better to implement this, hashmap or hashtable?
@raghavbhardwaj6702
@raghavbhardwaj6702 6 жыл бұрын
Sir plz make a video on gui in java
@preyas2198
@preyas2198 3 жыл бұрын
Sir can I use "List" instead of "Set" ???
@saurabhchopade3891
@saurabhchopade3891 6 жыл бұрын
I have one problem how to add 2 friend have same name but in Java we cannot use one key two time then how to implement the phone book in Java we use two value at a time but not key
@lankeshraut9
@lankeshraut9 6 жыл бұрын
help me alot to clear concept thank you \
17.11 Stream API in Java 8 Tutorial
10:56
Telusko
Рет қаралды 388 М.
01. Internal Working of HashMap & Java-8 Enhancement
19:11
WebEncyclop Tutorials
Рет қаралды 103 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 21 МЛН
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 59 МЛН
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 28 МЛН
14.5 LinkedList vs ArrayList in Java
9:16
Telusko
Рет қаралды 404 М.
Learn Hash Tables in 13 minutes #️⃣
13:26
Bro Code
Рет қаралды 324 М.
Map and HashMap in Java - Full Tutorial
10:10
Coding with John
Рет қаралды 542 М.
Hash Tables and Hash Functions
13:56
Computer Science
Рет қаралды 1,5 МЛН
Functional Interface | Lambda Expression in Java
13:56
Telusko
Рет қаралды 137 М.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 199 М.
Stream API in Java
26:04
Telusko
Рет қаралды 280 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 21 МЛН