Java collections framework interview questions and Answers | MOST ASKED | Core Java | Code Decode

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 436

  • @shubhamtagalpallewar7125
    @shubhamtagalpallewar7125 4 ปีที่แล้ว +101

    It helped me in my interview preparation.. thanks

    • @CodeDecode
      @CodeDecode  4 ปีที่แล้ว +15

      Hope you get all your interviews cleared. All the the best 🤟

    • @suratdas3866
      @suratdas3866 3 ปีที่แล้ว

      @@CodeDecode aa

    • @realnileshpawar
      @realnileshpawar 2 ปีที่แล้ว +1

      Kuthe rahto bhau tu? Do u want to take live instructor led classes? I have over 5 years of experience in corporate.

    • @accforgame8563
      @accforgame8563 ปีที่แล้ว

      ​@@realnileshpawar how do i contact u?.

    • @dubeyankitsarar8084
      @dubeyankitsarar8084 8 หลายเดือนก่อน

      Yes

  • @kirushnashirre6791
    @kirushnashirre6791 3 ปีที่แล้ว +28

    Though I knew about the framework completely, I had an issue explaining it in an organized way, you are just awesome!

  • @rohanbhargava3953
    @rohanbhargava3953 3 ปีที่แล้ว +41

    Great video! One addition to the last question on implementation of HashMap
    Since Java 8, once a threshold limit is reached for the number of linked list elements added at a particular node, the linked list is re-ordered to a binary tree to implement faster search for collision cases.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Thanks for the info

    • @JenilCalcuttawala
      @JenilCalcuttawala ปีที่แล้ว

      Binary but Binary Search Tree right?

    • @JustOssetian
      @JustOssetian ปีที่แล้ว

      ​@@JenilCalcuttawala red black tree

  • @anandbharadwaj
    @anandbharadwaj 3 ปีที่แล้ว +24

    Iterable you missed in the beginning

  • @harshadakankhar4875
    @harshadakankhar4875 4 ปีที่แล้ว +12

    Please make a video for Spring interview questions as well..

    • @CodeDecode
      @CodeDecode  4 ปีที่แล้ว +1

      Sure will do that soon

    • @harshadakankhar4875
      @harshadakankhar4875 4 ปีที่แล้ว +4

      Code Decode anyway the way you explain is just wow 🤗🤗

    • @CodeDecode
      @CodeDecode  4 ปีที่แล้ว +1

      thanks :) 👍

  • @prakashkaruppusamy3817
    @prakashkaruppusamy3817 3 ปีที่แล้ว +9

    This is a awesome 'Ready Reckoner'. I watched this and all are explained clear and to the point. This is great effort by the creator. Please make more topics and please make more videos. I totally understood the points. All the very best team 👍👏
    With Regards,
    Prakash Karuppusamy

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +2

      Thanks for the nice words Prakash. We will sure make more videos like this ....

  • @dasarajusaikumar8585
    @dasarajusaikumar8585 3 ปีที่แล้ว +4

    your phone vibrates in almost all of your videos. thats very nice :-). it's not a complaint, take it as a compliment

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +2

      we fixed this issue in new videos. Thanks 👍👍😊😊

  • @romanagr
    @romanagr 2 ปีที่แล้ว +3

    You forgot LinkedHashMap...

  • @kathiravanjagadeesan
    @kathiravanjagadeesan 3 ปีที่แล้ว +13

    Beautiful Effort.IT Field will remember your name forever.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +4

      Thanks for wonderful comment kathiravan. you might not know this but you made our day and all the efforts we did now turned meaningful bcz of such nice words🙏🙏. We , team code decode is grateful 🙏🙏. keep learning Kathiravan, you will surely land at your dream place really soon. all the best 👍👍👍👍

  • @tusharkawade1937
    @tusharkawade1937 2 หลายเดือนก่อน +1

    4:42 small correction, I think Linkedlist do allow index base search

  • @masthannaidu9420
    @masthannaidu9420 3 ปีที่แล้ว +1

    Yeah is there any pdf for these video....pls let me know if possible

  • @JourneyswithAK
    @JourneyswithAK 2 ปีที่แล้ว +1

    Seriously very great explanation ❤️

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks a lot 🙂🙂👍👍

  • @JasvikSree
    @JasvikSree 3 ปีที่แล้ว +1

    Hi medam,
    You have any material like these vieeos

  • @kazaasekhar
    @kazaasekhar 3 ปีที่แล้ว +3

    very nice but need more questions from collections with demonistration

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Sure we will create soon

  • @sneharaghuwanshi4933
    @sneharaghuwanshi4933 4 หลายเดือนก่อน +1

    Hello Ma'am, I have learnt a lot from your channel thank you so much. I have one doubt here that the linked list does not support index based search but it has a get method through which the element is at a specific position?

  • @sreejak6776
    @sreejak6776 3 ปีที่แล้ว +2

    Pleasr create more tricky questions on collections

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      sure sreeja we will create soon

  • @deviprasadhota2617
    @deviprasadhota2617 ปีที่แล้ว +3

    Nice work...one mistake is map interface doesnt extends(not implement) Collection interface

  • @rishiraj2548
    @rishiraj2548 ปีที่แล้ว +2

    5 lakh 48 thousand + views
    Congrats 🎉🎉🎉

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว +1

      Thanks Rishi for your constant support

  • @gokulaher2476
    @gokulaher2476 3 ปีที่แล้ว +1

    why java inventors not provided a new overloaded version of add(k,v) which can take two parameters
    key -value so that MAP interface can also extends Collection interface
    why there is separate put(k,v) I think the problem would have been solved just by adding one overloaded method add(k,v) pl correct me if I am incorrect

  • @manishsultanpure639
    @manishsultanpure639 3 ปีที่แล้ว +2

    Collection interface
    is not Root interface of Collection Framework due to Map

  • @abhishekupadhyay800
    @abhishekupadhyay800 3 ปีที่แล้ว +4

    Mam you forgot navigable set and navigable map interface

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      We will cover that in second part

  • @ajithkumarn1742
    @ajithkumarn1742 3 ปีที่แล้ว +1

    Palindrome program and prime number program explanation I need

  • @eswarm2689
    @eswarm2689 2 ปีที่แล้ว +1

    Here missed linked hash map concept

  • @gokulaher2476
    @gokulaher2476 3 ปีที่แล้ว +4

    java.lang
    Interface Iterable is root Interface or collection interface is root interface?

    • @manojht8036
      @manojht8036 2 ปีที่แล้ว

      Iterable

    • @avinashwagh7761
      @avinashwagh7761 2 ปีที่แล้ว

      iterable

    • @manojht8036
      @manojht8036 2 ปีที่แล้ว +1

      @@avinashwagh7761 Iterable is an interface it should start with I in uppercase

  • @nikhleshagrawal
    @nikhleshagrawal 3 ปีที่แล้ว +23

    from Java 8, the linked lists are dynamically replaced with balanced binary search trees in collision resolution after the number of collisions in a given bucket location exceed a certain threshold.
    This change offers a performance boost, since, in the case of a collision, storage and retrieval happen in O(log n).

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +4

      Yes we have covered that in latest videos I. E. top interview questions 👍👍. Thanks

    • @jakubdudek4133
      @jakubdudek4133 ปีที่แล้ว +1

      For others who are interested in that particular topic, the threshold by default is 8 as far as I remember. :) So "after" 8 nodes, LinkedList is being switched to Tree Balance Structure.

  • @sachdevasahil7
    @sachdevasahil7 หลายเดือนก่อน +1

    PLEASE UPDATE YOUR CONTENT !!! SEGMENT BASED LOCKING IS REPLACED WITH NEWER DATA STRUCTURES AFTER JAVA 8 !!!

    • @CodeDecode
      @CodeDecode  28 วันที่ผ่านมา

      WHAT IS THAT NEW DATA STRUCTURE? CAN YOU PLEASE LET THE COMMUNITY KNOW?

    • @CodeDecode
      @CodeDecode  28 วันที่ผ่านมา

      Also there is a change in how we store data, initially it was in linked list but now it's red black tree, that also only when the list reaches a threshold then it is converted to tree.
      A detailed video on that is already on the channel

    • @sachdevasahil7
      @sachdevasahil7 26 วันที่ผ่านมา +1

      @@CodeDecode now it uses a CAS (Compare-And-Swap) mechanism combined with finer-grained locking at the bucket level, which reduces contention significantly. Now each bucket (hash entry) can be locked individually for updates, and read operations don’t require locking at all in most cases.

    • @CodeDecode
      @CodeDecode  25 วันที่ผ่านมา

      Read operation never needed a lock !! Only write operation can cause race condition !!

  • @akashkeshari8927
    @akashkeshari8927 3 ปีที่แล้ว +2

    Can you please explain fail fast and fail safe by codes?

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      sure akash we will plan and make video on it soon.

  • @kshitijnimkar4252
    @kshitijnimkar4252 หลายเดือนก่อน

    Content is really usefull mam! If possible can you attach ppt document also with the video. It would help for quick recap

  • @keepitsimpletoday
    @keepitsimpletoday 2 ปีที่แล้ว +1

    Time: 18:50. HashMap is not synchronized. maybe HashTable ?

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Hash table is synchronized. Did we say it wrong??

    • @keepitsimpletoday
      @keepitsimpletoday 2 ปีที่แล้ว

      Hi. Pls check video on duration -18:50. You wrote syncronized collection … HashMap

  • @suvadipghosh1385
    @suvadipghosh1385 4 หลายเดือนก่อน

    18:44 Madam i think you are referring to Hashtable(thread-safe).....But by mistake it's written HashMap in this note.

  • @sushmakolli1119
    @sushmakolli1119 3 ปีที่แล้ว +2

    Please make another video(part2)on collections tricky questions and include concepts like internal working of hash set

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      th-cam.com/play/PLyHJZXNdCXsfqAkteaQ6JfZ_IHvxX-Hj3.html

  • @RaghuVN
    @RaghuVN 3 ปีที่แล้ว +1

    I don't get it. There is get method in Linkedlist class. I have heard the same thing in multiple videos. Is it added recently.

  • @gurudassulebhavikar
    @gurudassulebhavikar 11 หลายเดือนก่อน +1

    In case of hash collision it also uses equals method to check if key is same. If it is same then it updates the value. Otherwise, new node is inserted.

  • @mattbrody1424
    @mattbrody1424 3 ปีที่แล้ว +1

    and then Indians apply for Senior Java positions in the US :-)

  • @robelhailab394
    @robelhailab394 ปีที่แล้ว +2

    Great Explanation!!!
    One more point: Hashtable doesn’t extend Hashmap.
    It extends Dictionary Class.

  • @SravanKumarG-ty7bz
    @SravanKumarG-ty7bz 5 หลายเดือนก่อน +1

    Hi,As you mentioned, Hashset simply implements Hashtable. It means Hashtable is an interface. But hashtable is class, right? Can you please comment on this?

    • @CodeDecode
      @CodeDecode  5 หลายเดือนก่อน

      " Implemented " by this i didn't mean inheritance . I meant how we code it. It means in real time we implement set using hash table. Means it's backed by hash map/ hash table . Sorry for your confusion. Implemented is a term used in both English language and in technical terms

  • @sonalirajashri
    @sonalirajashri 8 หลายเดือนก่อน +1

    its very nice ad helpful.

    • @CodeDecode
      @CodeDecode  8 หลายเดือนก่อน

      Thanks Sonali 👍

  • @DiKshu33
    @DiKshu33 2 หลายเดือนก่อน

    @codedecode NavigableSet & NavigableMap interfaces are missed

  • @croydon21H
    @croydon21H 6 หลายเดือนก่อน

    @13:45 can't agree on that point. add can take an Entry , which is key and value. so should be ok isnt??

  • @amitpadole5856
    @amitpadole5856 5 หลายเดือนก่อน

    but index based search is possible in linkedlist contradictory to what you depicted.

  • @prernajain2279
    @prernajain2279 7 หลายเดือนก่อน

    Some correction need in the video content
    Queue - perform insertion and deletion at front
    priority Queue - lower the number means higher the priority

  • @savitarohra3905
    @savitarohra3905 3 ปีที่แล้ว +3

    Everything explained to the point!! Thank you for making great videos

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Thanks Savita 👍

  • @robinbhargava111
    @robinbhargava111 ปีที่แล้ว +2

    Very informative and quick to brush up collection framework with examples.

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Thanks Robin 🙂👍

  • @Hare_Krishna143
    @Hare_Krishna143 2 ปีที่แล้ว +2

    Such helpful content and appreciate your hardwork Thank you mam!!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Manoj 🙂👍

  • @avinashrawat5823
    @avinashrawat5823 10 หลายเดือนก่อน +1

    very informative Thanks

    • @CodeDecode
      @CodeDecode  10 หลายเดือนก่อน +1

      Glad you found it helpful😊

  • @akshataggarwal3277
    @akshataggarwal3277 หลายเดือนก่อน +1

    Informative ++

    • @CodeDecode
      @CodeDecode  29 วันที่ผ่านมา

      Thanks

  • @priyankahude1918
    @priyankahude1918 4 หลายเดือนก่อน +1

    Hashmap non synchronised

    • @CodeDecode
      @CodeDecode  4 หลายเดือนก่อน

      Yeah it's not. Hash table is

  • @SuperMilanjain
    @SuperMilanjain 3 ปีที่แล้ว +3

    Really a nice approach to make understand the topic. Just one request, plz add some behavioral questions related to collection as interviewer can ask that also.

  • @mathsbyharshita7998
    @mathsbyharshita7998 3 ปีที่แล้ว +1

    You mentioned that put method of map just append the node if hash is collision, i don't think so, can you give some references of it, I think if hash is same then it's call equal method and if same key found with equal contain then it's override the value. You can check it via override equal and hashcode(just print something on first line of override version of equal and hashcode) for custom object and just put that object in map, it will call first hashcode, if hashcode is same it will call equal

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      If you have heard right I have said "another key has same index 0" at 24:12 .
      Another key can't qualify equals condition. Right?
      I was expecting you to know that hash code can't have duplicate keys. It will obviously replace the value. The concept I was telling was for different key having same index. Please listen carefully.

  • @bhavyabhardwaj4563
    @bhavyabhardwaj4563 5 หลายเดือนก่อน +1

    Very good explanation of Internal working of hashmap. Liked it.

    • @CodeDecode
      @CodeDecode  5 หลายเดือนก่อน

      Thanks

  • @venkatkancharla984
    @venkatkancharla984 3 ปีที่แล้ว +2

    thanks for all the tricky quaetions, please explain the HashMap with some examples and this is very short. because i was understanding this only theoretically but havent't implemented. bit more explanation on hash map.. it also talks about the equals() and hashCode() contract..

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Hi Venkat
      These are only interview questions. Will create tutorial for this very soon 👍👍

    • @venkatkancharla984
      @venkatkancharla984 3 ปีที่แล้ว

      @@CodeDecode sure, thanks

  • @sagarmane3291
    @sagarmane3291 2 ปีที่แล้ว +1

    Superbbb...! your explanation skills are just awesome....
    and ur voice is adorable as well. thanks for this questions set it will be really helpful

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks Sagar 🙂🙂

  • @mitra.1
    @mitra.1 7 หลายเดือนก่อน +1

    Thanks a lot.. The best Collection summary available on YT.

  • @tmmca10
    @tmmca10 2 ปีที่แล้ว +1

    is hashmap is synchronized ?

  • @raghavendraboddupalli1181
    @raghavendraboddupalli1181 3 ปีที่แล้ว +1

    Code Decode, Your playlist is not coorectly organised, can you please revisit the playlist and reorder it. Like Java 8 Interview Questions, Java Interview Questions and Spring Interview Question.

  • @nihal999in
    @nihal999in 2 ปีที่แล้ว +1

    Collection interface also extend Iterable interface which is root. Please confirm this one.

  • @debasishpanigrahi4503
    @debasishpanigrahi4503 2 ปีที่แล้ว +1

    6:50 Hashtable isn't implemented Hashset, it's "Hash Table" in the code of Hashmap. please check and correct.
    I got confused when I watched first.
    If i interpreted wrongly, Please let me know your thoughts.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +3

      Internally hash map uses hash table. Hash set internally uses hash map. So indirectly hash set uses hash table .

  • @nikhilchourasiya4720
    @nikhilchourasiya4720 2 ปีที่แล้ว +1

    Your voice is too sweet mam

  • @naadhsharyticha
    @naadhsharyticha 3 ปีที่แล้ว +1

    Hi , I'm stucked in one problem statement where I have to use collection map with duplicate keys can you help me in that

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Multimap multimap = ArrayListMultimap.create();
      multimap.put(1, "A");
      multimap.put(1, "B");
      multimap.put(1, "C");
      multimap.put(1, "A");
      multimap.put(2, "A");
      multimap.put(2, "B");
      multimap.put(2, "C");
      multimap.put(3, "A");
      System.out.println(multimap.get(1));
      System.out.println(multimap.get(2));
      System.out.println(multimap.get(3));
      Output is:
      [A,B,C,A]
      [A,B,C]
      [A]

  • @tawbinable
    @tawbinable 2 ปีที่แล้ว +1

    can you plz create a video to show demo about fail-fast and fail-safe ?

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure we will create separate video on that

  • @satishdhaigude629
    @satishdhaigude629 ปีที่แล้ว +1

    Thank you, nice explanation of all collections, mostly I like internal working of hash map, got the more clarity….

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      th-cam.com/video/7k0VYHuUF6g/w-d-xo.html

  • @anuradhap4055
    @anuradhap4055 2 ปีที่แล้ว +3

    Hi.. Your videos are the best. You explain so well. Thanks a ton for your efforts. One request.. can you please make a video on how time complexity works in collection?. It would be a great help. Thanks in advance. 🙂

    • @Sanketpatil96k
      @Sanketpatil96k 3 หลายเดือนก่อน

      The time complexity of a collection is the amount of time it takes to perform an operation on the collection

  • @palakpatel396
    @palakpatel396 4 ปีที่แล้ว +2

    Remembering all concepts of collection fw is just small part of core java , and even if we learn all concept of core java then-recent JD's says you have nothing to do with core java if you don't know the FW such as hibernate or spring ... Ok you don't have knowledge of Database so you are Rejected.

    • @CodeDecode
      @CodeDecode  4 ปีที่แล้ว +12

      Hi palak, that's so true that now a days job descriptions do require all such stuffs. Keeping this in mind next video I will put on advanced Java interview questions and then will plan for sqls and databases too.
      I m already in IT sector and have cleared a lot of interviews and with experience i can say this that there is always one job which is best fit for you. Just keep looking and you will for sure end up at the right place at the right time.
      Just keep patience and keep studying because working in IT sector is totally different and cracking an interview in IT sector is completely different thing.

    • @Rohit-ns5tt
      @Rohit-ns5tt 4 ปีที่แล้ว +3

      Forget spring and hibernate they now want person with microservices knowledge with devops tools. I am so frustrated due to this.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +3

      We will cover micro services, Eureka, elastic search, rest API , CD ci pipeline, docker every thing slowly

  • @nikitapatil8380
    @nikitapatil8380 3 ปีที่แล้ว +3

    Hashmap is not synchronised hashtable is synchronised..i guess you wanted to say hashtable there

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Hey Nikita there must be a confusion here. As said at 11:44 minute - hash map is non synchronised.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      And that 12:12 we have discussed that hash table is synchronised.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      I went through this whole video and I cannot find the place where I have said it in opposite way. Please let me know where did you find this. Thanks in advance 👍

    • @nikitapatil8380
      @nikitapatil8380 3 ปีที่แล้ว

      @@CodeDecode 18:44

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      There I was marking on screen. It's correctly said. Markings might be over lapped that's why you are not able to see my cursor.

  • @praveenagrawal9616
    @praveenagrawal9616 ปีที่แล้ว

    Thanks for the video. It's really helpful for interview preparation. One small doubt I have in 6:57 you said hashset internally implements hashtable and one null value can contain. But hashtable doesn't contain any null key and null value.. Please explain and correct me.

  • @Athira_Surendran
    @Athira_Surendran 3 ปีที่แล้ว +3

    The way you explaining each topic is awesome.
    Thank you for the amazing video.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Thanks for the nice words.....

  • @pallavipatare2004
    @pallavipatare2004 3 ปีที่แล้ว +1

    This is my first ever TH-cam comment. I just logged in to youtube so that I can comment on your video.
    You are awesome. Very well explained, very well organised. Keep it up. No nonsense videos. I am preparing for my interviews using your videos only. Pls countinue uploading many such videos.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Thanks Pallavi 🙂👍

  • @farrukhahmedsid
    @farrukhahmedsid 4 หลายเดือนก่อน +1

    Yes this is literally most asked and top questions. Thanks.

    • @CodeDecode
      @CodeDecode  4 หลายเดือนก่อน

      Thanks

  • @jasper5016
    @jasper5016 2 ปีที่แล้ว +2

    It enhanced my knowledge for sure. Thanks.

  • @sailakshmantech55
    @sailakshmantech55 2 ปีที่แล้ว +1

    thank you madem very good explanation 👌👌👌🙏

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      You are welcome

  • @RaviK-lv9zf
    @RaviK-lv9zf ปีที่แล้ว +1

    Beautiful voice.. 😅 and the content is so good that you almost covered main topics that can consume most of the time at institutes.

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Thanks Ravi 🙂🙂

  • @shivaniagrawal4473
    @shivaniagrawal4473 3 ปีที่แล้ว +2

    Thank u so much,your way of explaining concepts are wonderful.I am feeling so confident in Java after watching your interview questions.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Thanks Shivani 👍👍. Keep learning keep shining ⭐✨⭐✨

  • @harshadramekar
    @harshadramekar 3 ปีที่แล้ว +1

    Please add more question which can be asked for 7 yrs experienced

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Sure we are planning to do that soon.....

  • @Sakshi-gs5tl
    @Sakshi-gs5tl 3 หลายเดือนก่อน +1

    Awesome video for java collections 💯💯💯

    • @CodeDecode
      @CodeDecode  2 หลายเดือนก่อน

      Thanks sakshi 👍

  • @MindfullEating
    @MindfullEating 2 ปีที่แล้ว +1

    Internal of hashset and mock interview preparation

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      th-cam.com/video/7k0VYHuUF6g/w-d-xo.html
      Here u go

  • @krupak2568
    @krupak2568 2 ปีที่แล้ว +1

    Linked hashmap

  • @anushrimishra9016
    @anushrimishra9016 2 ปีที่แล้ว +1

    Now with recent release treeset is being used in case of collision.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      th-cam.com/video/7k0VYHuUF6g/w-d-xo.html

  • @Chhunumunu
    @Chhunumunu 3 ปีที่แล้ว +1

    Can you please make videos only on hashmap? All the interview questions related to hashmap?

  • @dineshsolanki1666
    @dineshsolanki1666 3 ปีที่แล้ว +1

    an image with all the information would be great

  • @venkatasaikrishnak6984
    @venkatasaikrishnak6984 3 ปีที่แล้ว +1

    Please continue and create video for internal working of hashset as well.

  • @СветлинТомов-ъ2х
    @СветлинТомов-ъ2х ปีที่แล้ว +1

    I was hoping it was in English not in Hinglish.

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Apologies for inconvenience. We cant fake british accent. It is what it is. No faking. But really sorry that this accent is not understood by people outside. We will try to put translators if TH-cam supports. In which accent u need the sound??

    • @СветлинТомов-ъ2х
      @СветлинТомов-ъ2х ปีที่แล้ว +1

      @@CodeDecode In English, as a matter of fact you guys have the most knowledge in the field, people like me look up to you. Just a suggestion - add subtitles to your videos,this will majorly improve your content. No hard feelings you are doing great, keep on improving.

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Hey man we can see subtitles already there in this video. And they are translating properly too. Are we on same page? Are we missing any thing here

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      Thanks for the valuable feedback though. We are glad you are helping us to improve🙂🙂need some more of your inputs and time👍🙂kindly help us with some more inputs for better understanding the issue

  • @rishiraj2548
    @rishiraj2548 ปีที่แล้ว +1

    550K views🎉

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      😊😊🙏 Thanks Rishi for being there with us since so long

  • @filip8467
    @filip8467 3 ปีที่แล้ว +1

    when i have a key object, lets pretend i am putting it into hashMap, hashcode is generated and putted into hash place, by hash method, is hascode and hash the same thing or i am missing something?

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Are you confused between hash code and hash bucket

    • @filip8467
      @filip8467 3 ปีที่แล้ว

      ​@@CodeDecode by hash bucket you mean the table which is created when i am putting something into the map? then no, i am curious is it working like this:
      1. i am putting something into the hashmap
      2.table has been created, on the key value hash method is invoked and inside this method hashCode method is invoked (on the result of hashCode method there is some binary operation and we get the result )
      3.this result is used to compute the index
      etc etc
      am i right or i am missing something?
      thank you for answer :D

  • @gokulaher2476
    @gokulaher2476 3 ปีที่แล้ว +1

    Question: If the key of Hashmap is Immutable Object(properly create by developer with no mistake or let's say it's String class object) then do we need to override hashcode() and equals()? Or having immutable field as key solves the problem of overriding hashcode() and equals()?

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Yes you have to.

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Immutability does not make sure that your equal objects are stored at same bucket location. Hash code does. Interviewer is just trying to trick you.

    • @gokulaher2476
      @gokulaher2476 3 ปีที่แล้ว

      @@CodeDecode thank you!

  • @sivasankarbestha
    @sivasankarbestha 3 ปีที่แล้ว +1

    Very clear explanation.. and provide example code 👍👍👍👍

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Thanks Siva 👍👍

  • @nehakumari-ls6ec
    @nehakumari-ls6ec 2 ปีที่แล้ว +1

    you have missed linked hash map

  • @nidhi10sharma
    @nidhi10sharma 2 ปีที่แล้ว +1

    Excellent videos, Thank you so much!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Thanks Nidhi 🙂👍

  • @sonalisingh-uc7it
    @sonalisingh-uc7it 3 ปีที่แล้ว +1

    Can u also explain what happens when we only implement equals metho and not hash code method..?

    • @rajukomati7545
      @rajukomati7545 3 ปีที่แล้ว

      It uses the hashCode() method from Object class. But it's not a good practice beacuse it may effect in equals method returning true for two unequal objects.

  • @robinbhargava111
    @robinbhargava111 ปีที่แล้ว

    In HashTable, we can store the Null values. In the video, you are saying it can not store either null keys or values. import java.util.Hashtable;
    public class HashTableExample {
    public static void main(String[] args) {
    Hashtable ht = new Hashtable();
    ht.put(1, "One");
    ht.put(2, null);
    ht.put(3, "Three");
    ht.put(4, null);
    System.out.println(ht);
    String value = ht.get(2);
    System.out.println("Value of key 2 is: " + value);
    }
    }
    =======================
    Output
    {4=null, 3=Three, 2=null, 1=One}
    Value of key 2 is: null

  • @coincidentIndia
    @coincidentIndia 2 ปีที่แล้ว +2

    SortedSet uses Comparator(Comparator

  • @kemparaj565
    @kemparaj565 2 ปีที่แล้ว +1

    Very good. Explanation. Thank You 😊

  • @prashanthsuresh9156
    @prashanthsuresh9156 3 ปีที่แล้ว

    public class LinkedListDemo {
    public static void main(String[] args) {
    LinkedList values = new LinkedList();
    values.add("Prashanth"); // Integer v=new Integer(4)
    values.add("Anup");
    values.add("Vicky");
    values.add("Mahi");

    System.out.println("Random Access " +values.get(2));
    Iterator it = values.iterator();
    while (it.hasNext()) {
    System.out.println(it.next());
    }
    }
    }
    Output :
    Random Access Vicky
    Prashanth
    Anup
    Vicky
    Mahi
    Linked list is allowing me to do random access of elements with index....Am i missing something ...just for understanding im asking

  • @brajray2881
    @brajray2881 ปีที่แล้ว +1

    Thanks 🎉

  • @sekhar14301
    @sekhar14301 ปีที่แล้ว +1

    Thanks for wonderful explanation 🤝

  • @vipinahuja6096
    @vipinahuja6096 3 ปีที่แล้ว +4

    Thanks for the awesome video. However, 18:40 you mentioned HashMap is slower as compared to its respective concurrent counterparts. But that's not true as HashMap is non-synchronized faster. Please correct me if I am wrong

  • @RickyYadav_at_googleplus
    @RickyYadav_at_googleplus 3 ปีที่แล้ว +1

    very nicely explained... eagerly waiting for Multi-threading concepts.. once again good job!

  • @GaneshSingh1
    @GaneshSingh1 3 ปีที่แล้ว +1

    I have read theory before but confused after this video cleared all doubts about Hashmap,, thanks a lot

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      We are glad to know that this helps Ganesh 🙏👍

  • @kumar17299
    @kumar17299 3 ปีที่แล้ว +2

    Hello Akka, need practical example...

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว +1

      Sure will create second part. In that will give you live demos. Is that what you want ?

    • @kumar17299
      @kumar17299 3 ปีที่แล้ว +1

      @@CodeDecode okay, please explain with code, then it will make more understandable to learners and learned people

    • @CodeDecode
      @CodeDecode  3 ปีที่แล้ว

      Sure will do that in second part 👍

  • @mohammedabraruddin9779
    @mohammedabraruddin9779 2 ปีที่แล้ว +1

    yes i would love to see internal working of hashSet

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      th-cam.com/video/7k0VYHuUF6g/w-d-xo.html

  • @satishr2071
    @satishr2071 4 ปีที่แล้ว +3

    Nice video keep it up 👍