Frankly speaking, I just searched Hashmap interview questions, though I was going with the first search result then suddenly I saw byte programming and I went here. Very informative videos on your channel.
@manojmajumdar3815
3 жыл бұрын
This channel definitely deserves more subscribers . All the questions asked in this Hashmap video are explained in-depth.
@ByteProgrammingVedantHarish
3 жыл бұрын
Much appreciated!
@basavarajnv1017
3 жыл бұрын
Thanks so much Sir.. Really nice video ,very informative 🙏
@theupdatetracker8598
4 жыл бұрын
Very nice sir..Very informative.. Please explain utilzing the custom key part, where we need to override equals hashcode methods in detail(example) if possible ..and please make one vid on concurrency and concurrent collections.. Thanks alot 🙂
@ByteProgrammingVedantHarish
4 жыл бұрын
Sure! Stay tuned!
@Hacks00145
3 жыл бұрын
Thanks for video.
@yoshitamahajan353
4 жыл бұрын
Which underlying data structure does hashmap follows? Arrays or some other?
@ByteProgrammingVedantHarish
4 жыл бұрын
@Yoshita Hashmap internally has array and each node can contain linkedlist or tree.
@yoshitamahajan353
4 жыл бұрын
@@ByteProgrammingVedantHarish thanks
@amscoder5262
3 жыл бұрын
The underlying data structure in case of HashMap is "Hashtable"
@yoshitamahajan353
4 жыл бұрын
Hi what exactly do we have to write inside hashcode() method when creating our own custom class? As we need to override hashcode method so what content should be present inside hashcode if we have to write the content inside hashcode() method?
@ByteProgrammingVedantHarish
4 жыл бұрын
@Yoshita : Hashcode is used to calculate index. Try using permutation of hashcode all fields and multiply with 2 or 3 prime numbers.
@yoshitamahajan353
4 жыл бұрын
@@ByteProgrammingVedantHarish thanks
@indexOutOfBound
4 жыл бұрын
If we do these in the hashmap--- hm.put("1","Ram"); hm.put("1",Shyam); Then 1 will hold Ram/Shyam ? and what will be hm.get("1")?
@ByteProgrammingVedantHarish
4 жыл бұрын
@Vishal Keys are unique in java. hm.put("1", "Ram") => hashmap output :{1 = Ram} hm.get("1") => Ram hm.get(1) => null //key is int, no value present for this key String putVal = hm.put("1", "Shyam") => hashmap output : {1=Shyam} hm.get("1") => Shyam hm.get(1) => null //key is int, no value present for this key putVal value => Ram Hope it helps.
Пікірлер: 18