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

Поділитися
Вставка
  • Опубліковано 9 лип 2024
  • This video contains tricky Java Collections Interview Questions and Answers for Freshers as well as for Experience Candidates. It also contains Internal Working of Hashmap
    Collections Interview Questions part -2 : • Most Asked Java Collec...
    Udemy Course of Code Decode on Microservice k8s AWS CICD link:
    openinapp.co/udemycourse
    Course Description Video :
    yt.openinapp.co/dmjvd
    Collection Hierarchy 00:16
    Map doesn’t extend the Collection Interface 13:13
    Difference between fail-fast and fail-safe Iterators 14:51
    java BlockingQueue 16:43
    Difference between Synchronized Collection and Concurrent Collection with pictorial understanding 18: 10
    Internal Working of hash map with pictorial explanation 20:13
    In this video of java collections interview questions we have covered java collection framework interview questions or top collections interview questions starting with hierarchy of collection framework in java
    collection hierarchy in java will demonstrate in depth knowledge of candidate.
    *************************************************************************************
    In java collections interview questions. java.util.Collection is the root
    of the Java Collection framework and most of the collections in Java are inherited from this interface except Map Interface
    java.util.List :
    Contains ordered elements
    May include duplicates
    Supports the index-based search, random access but elements can be easily inserted irrespective of the position.
    java.util.Queue
    follows a FIFO approach
    Elements adds at rear end and removes from the front end.
    java.util.Set:
    Doesn’t define an order for the elements hence index-based search is not supported
    Doesn’t contain duplicates
    java.util.Map
    Represents a key, value pair
    Map interface does not implement the Collection.
    It can only contain a unique key
    can have duplicate values
    In java collections interview questions Similarly all these interfaces have implementing class and all those implementing classes have some 2 3 unique feature which differentiate them from the other collections. Please have a look at each of them in video as i have limited word limit here :)
    The Java BlockingQueue interface, java.util.concurrent.BlockingQueue, represents a queue which is thread safe to put elements into, and take elements out of from. In other words, multiple threads can be inserting and taking elements concurrently from a Java BlockingQueue, without any concurrency issues arising.
    -------------------------------------------------------------------------------------------------------------------------------------
    Code Decode Playlists
    Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
    Advance Java Interview Questions and Answers : • Advance Java Interview...
    Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
    Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
    Spring Boot Interview Questions and Answers : • Advance Java Interview...
    Angular Playlist : • Angular Course Introdu...
    GIT : • GIT
    -------------------------------------------------------------------------------------------------------------------------------------
    Subscriber and Follow Code Decode
    Subscriber Code Decode : ua-cam.com/users/CodeDecode?...
    Linkedin : / codedecodeyoutube
    Instagram : / codedecode25
    --------------------------------------------------------------------------------------------------------------------------------------
    #javacollectioninterviewquestion #topjavacollectioninterveiwquestion #javainterviewquestion #codedecode

КОМЕНТАРІ • 426

  • @shubhamtagalpallewar7125
    @shubhamtagalpallewar7125 3 роки тому +99

    It helped me in my interview preparation.. thanks

    • @CodeDecode
      @CodeDecode  3 роки тому +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.

    • @TheBoysZone
      @TheBoysZone 2 роки тому

      as ka😂😂😂😂

    • @accforgame8563
      @accforgame8563 Рік тому

      ​@@realnileshpawar how do i contact u?.

  • @kirushnashirre6791
    @kirushnashirre6791 3 роки тому +24

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

  • @coincidentIndia
    @coincidentIndia 2 роки тому +2

    SortedSet uses Comparator(Comparator

  • @rohanbhargava3953
    @rohanbhargava3953 3 роки тому +39

    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.

  • @jasper5016
    @jasper5016 2 роки тому +2

    It enhanced my knowledge for sure. Thanks.

  • @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.....

  • @mitra.1
    @mitra.1 5 місяців тому +1

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

  • @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 ⭐✨⭐✨

  • @prakashkaruppusamy3817
    @prakashkaruppusamy3817 3 роки тому +8

    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 ....

  • @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 👍👍👍👍

  • @nikhleshagrawal
    @nikhleshagrawal 3 роки тому +21

    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.

  • @savitarohra3905
    @savitarohra3905 2 роки тому +3

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

  • @robelhailab394
    @robelhailab394 2 роки тому +1

    You are awesome, thanks for thanking your time to help us on interview preparations!

    • @CodeDecode
      @CodeDecode  2 роки тому

      Thanks for motivating us to put more efforts for community 🙂. We are glad to do that 🙂👍

  • @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.

  • @sharathrajesh9494
    @sharathrajesh9494 2 місяці тому

    Hi Mam, this video about collections helped me during my interview with TCS and I secured a job offer!
    Thank you very much and I will continue to look through your other videos to help broaden my knowledge

  • @robinbhargava111
    @robinbhargava111 11 місяців тому +2

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

    • @CodeDecode
      @CodeDecode  11 місяців тому

      Thanks Robin 🙂👍

  • @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 🙏👍

  • @robelhailab394
    @robelhailab394 10 місяців тому +2

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

  • @pallavipatare2004
    @pallavipatare2004 2 роки тому +1

    This is my first ever UA-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.

  • @RickyYadav_at_googleplus
    @RickyYadav_at_googleplus 3 роки тому +1

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

  • @parulanand7902
    @parulanand7902 3 роки тому +1

    Thank you for the amazing video.. It helped me a lot for my interview.

    • @CodeDecode
      @CodeDecode  3 роки тому

      Thanks for writing back to us Parul . We hope u land at your dream job soon. All the very best from team code decode, for your interviews. Keep learning keep growing.

  • @sureshgarine
    @sureshgarine 3 роки тому +1

    Thank you so much, madam. You explained in-depth and very nicely

  • @JourneyswithAK
    @JourneyswithAK 2 роки тому +1

    Seriously very great explanation ❤️

    • @CodeDecode
      @CodeDecode  2 роки тому

      Thanks a lot 🙂🙂👍👍

  • @praveenpatel3957
    @praveenpatel3957 3 місяці тому

    This special video covered all related to collection and its interview questions have watched so many videos about that but here have learnt in very different way thanks for sharing such valuable content in the video keep sharing like this we get to learn more..❤❤

  • @gurudassulebhavikar
    @gurudassulebhavikar 8 місяців тому +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.

  • @vinodkumar-lq7oo
    @vinodkumar-lq7oo 3 роки тому +1

    Really very good explanation.
    We are lucky to watch this.

  • @dasarajusaikumar8585
    @dasarajusaikumar8585 2 роки тому +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  2 роки тому +2

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

  • @anshumanpanigrahi7817
    @anshumanpanigrahi7817 2 роки тому +3

    Ma'am, thank you for this.
    It really helped me in cracking Amdocs. I was able to recall the exact same thing you taught in this video.
    I can say, that I've done DSA and used every framework that's why it looked very understandable at the very first go.

    • @CodeDecode
      @CodeDecode  2 роки тому +1

      Congratulations Anshuman 🎊🎊🎉🎉

    • @shouryapradhan184
      @shouryapradhan184 2 роки тому

      HI Anshuman , Bro i have an Amdocs interview in upcomming week. Can u pls help me in that like how is the interview and what questions were asked in that interview please ? Can we connect?

    • @anshumanpanigrahi7817
      @anshumanpanigrahi7817 2 роки тому +1

      @@shouryapradhan184 Topics- Java, Oops, Threads, Collections, SQL, DBMS, Unix commands, 2 programming questions. Go through interview experiences from gfg & Coding Ninjas/CodeStudio, that'll be enough.
      Mine was for developer profile.

    • @shouryapradhan184
      @shouryapradhan184 2 роки тому

      @@anshumanpanigrahi7817 Thanks a lot for reply bro. Mine interview is also for developer role 2 years of experience. May i know what type of programming questions were asked in interview ?

  • @sneharaghuwanshi4933
    @sneharaghuwanshi4933 2 місяці тому +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?

  • @venkatv3690
    @venkatv3690 2 роки тому +1

    Best i have seen before the way ur explaining very well thank you

  • @kaushikigoel759
    @kaushikigoel759 2 роки тому +1

    Each and every video is so informative!! Love your content ❤️..

  • @kajalkukreja694
    @kajalkukreja694 3 роки тому +1

    Very good questions and their detailed explanation. Thanks 👍👍

    • @CodeDecode
      @CodeDecode  3 роки тому +1

      Thanks for the nice words...

  • @farrukhahmedsid
    @farrukhahmedsid Місяць тому +1

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

  • @vinayvjs628
    @vinayvjs628 3 роки тому +3

    Best study video for interview

  • @nagavenkatakishore4109
    @nagavenkatakishore4109 3 роки тому +1

    Nice explanation friend thank you very much for sharing.

    • @CodeDecode
      @CodeDecode  3 роки тому

      Thanks for the nice words 👍

  • @prasannaakolka
    @prasannaakolka 3 роки тому +1

    Thanks a lot for the awesome content!!

  • @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 15 днів тому

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

  • @BhushanRawoolShridhar
    @BhushanRawoolShridhar 3 роки тому +1

    Nice explanation,you are doing a great job. Thank You

  • @solomonrajkumar5537
    @solomonrajkumar5537 3 роки тому +1

    Hats off very nicely explained and your presentation is also too good.

  • @Hare_Krishna143
    @Hare_Krishna143 2 роки тому +2

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

  • @satishdhaigude629
    @satishdhaigude629 Рік тому +1

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

    • @CodeDecode
      @CodeDecode  Рік тому

      ua-cam.com/video/7k0VYHuUF6g/v-deo.html

  • @shamilraj322
    @shamilraj322 2 роки тому +1

    Thank you for a very detailed explanation. :) Expecting more videos like this.

    • @CodeDecode
      @CodeDecode  2 роки тому +1

      Sure Shamil. We will upload more videos on collection framework

  • @nidhi10sharma
    @nidhi10sharma 2 роки тому +1

    Excellent videos, Thank you so much!

  • @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

  • @bhavyabhardwaj4563
    @bhavyabhardwaj4563 2 місяці тому +1

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

  • @shubhammowade.6019
    @shubhammowade.6019 3 роки тому +1

    Respect for your explanation ma'am...

  • @kp-ps7wi
    @kp-ps7wi 3 роки тому

    Explanation is awesome. Just a suggestion. In the diagram just put dotted line for interface and solid line for class. So while seeing the diagram people will understand the concept.

    • @CodeDecode
      @CodeDecode  3 роки тому

      That's a very nice suggestion. Thanks 🙏👍👍👍👍

  • @PKS-ky9se
    @PKS-ky9se 2 роки тому +1

    Thanks for the great video. Helped me a lot.

  • @ravikirantakale6616
    @ravikirantakale6616 3 роки тому +1

    Thank you so much for such useful content 🔥🔥🙏

  • @deviprasadhota2617
    @deviprasadhota2617 Рік тому +3

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

  • @kemparaj565
    @kemparaj565 2 роки тому +1

    Very good. Explanation. Thank You 😊

  • @vipinyadav7921
    @vipinyadav7921 3 роки тому +1

    Very nicely explained,
    Please make a video on whole springboot concepts... With theory and coding as well

    • @CodeDecode
      @CodeDecode  3 роки тому +1

      Sure will make a video on that too

  • @seethegodinyou
    @seethegodinyou 2 роки тому +1

    Thank you so much , I found all my interviews questions from there...We need people like you!

    • @CodeDecode
      @CodeDecode  2 роки тому

      Thanks for nice words chandan

  • @chishamalama
    @chishamalama Рік тому +1

    Thank you once again for explaiing clearly

    • @CodeDecode
      @CodeDecode  Рік тому

      Thanks Chisha Malama 🙂🙂👍👍

  • @narendulatharun9624
    @narendulatharun9624 3 роки тому +1

    Wow great mam thanks for this amazing video🔥

  • @danilozimermann7809
    @danilozimermann7809 2 роки тому +1

    Very well explained! thank you

  • @Sakshi-gs5tl
    @Sakshi-gs5tl 10 днів тому +1

    Awesome video for java collections 💯💯💯

  • @shubhamshende9995
    @shubhamshende9995 2 роки тому +1

    very clear and crisp explaination 💥

  • @kamallochannayak2706
    @kamallochannayak2706 2 роки тому +1

    Thank you mam .....your way of talking/understanding.....love it

  • @srikarwarrior123
    @srikarwarrior123 3 роки тому +1

    Thank you so much for the video :)

    • @CodeDecode
      @CodeDecode  3 роки тому

      Thanks for writing back Srikar 👍👍

  • @amitarcade
    @amitarcade 2 роки тому

    For hashmap internal working, hashcode method is called by hash method of HashMap and hash method calculates index based on hashcode value

    • @CodeDecode
      @CodeDecode  2 роки тому

      ua-cam.com/video/7k0VYHuUF6g/v-deo.html

  • @neerajkbc
    @neerajkbc 2 роки тому +1

    Thanks for the video, really helpful 👍

    • @CodeDecode
      @CodeDecode  2 роки тому +1

      You are welcome neeraj...

  • @krishteja2959
    @krishteja2959 3 роки тому +1

    superb.....Nice presentation .If possible, can you please do video like most asked interview questions which covers all the concepts in core and advanced

    • @CodeDecode
      @CodeDecode  3 роки тому +1

      Sure I will cover all of them, from simple to advanced in parts soon

  • @sekhar14301
    @sekhar14301 Рік тому +1

    Thanks for wonderful explanation 🤝

  • @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

  • @koteshwarvenigalla7150
    @koteshwarvenigalla7150 3 роки тому +1

    Great explanation!

  • @sivasankarbestha
    @sivasankarbestha 3 роки тому +1

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

  • @Daxbedivlogs
    @Daxbedivlogs 3 роки тому +1

    just subscribed your channel after this video.. thanks :)

    • @CodeDecode
      @CodeDecode  3 роки тому +1

      M glad you find this helpful

  • @avinashrawat5823
    @avinashrawat5823 7 місяців тому +1

    very informative Thanks

    • @CodeDecode
      @CodeDecode  7 місяців тому +1

      Glad you found it helpful😊

  • @rishiraj2548
    @rishiraj2548 3 місяці тому

    16:07
    ConcurrentModificationException:-
    When modification is performed on a collection by the same thread which is iterating over that collection.
    It's not about two distinct threads for iterating and modifying.

  • @sonalirajashri
    @sonalirajashri 5 місяців тому +1

    its very nice ad helpful.

  • @rajatram5068
    @rajatram5068 3 роки тому +1

    Awesome Explanation

  • @nitupandey7520
    @nitupandey7520 3 роки тому +1

    Thnks for this video 🙏🏼

  • @jeevansaimanikanta782
    @jeevansaimanikanta782 3 роки тому +4

    Thanks . Please do the video showing the internal implementation of HashSet as well and also tell the info like in which scenario which kind of Collection is the suitable one to use

  • @satishr2071
    @satishr2071 4 роки тому +3

    Nice video keep it up 👍

  • @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.

  • @arunkumarmn7493
    @arunkumarmn7493 3 роки тому +1

    Wow great explaination

  • @harshadakankhar4875
    @harshadakankhar4875 3 роки тому +12

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

  • @TheFebruary10
    @TheFebruary10 2 роки тому +1

    Very good to remember and recollect

  • @sanjeetkrsinha
    @sanjeetkrsinha Рік тому

    Your video helps me a lot for preparation of interview. Do you have any the text tutorial also for it?

  • @shivaraja3488
    @shivaraja3488 6 місяців тому

    Thank you very much

  • @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 роки тому

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

  • @dineshsolanki1666
    @dineshsolanki1666 3 роки тому +1

    an image with all the information would be great

  • @ammarzafar1337
    @ammarzafar1337 2 роки тому +1

    Very Well Explained.

  • @tusharkawade1937
    @tusharkawade1937 2 дні тому

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

  • @ravikaramunge8028
    @ravikaramunge8028 3 роки тому +1

    Thanks its really helpful 😊

    • @CodeDecode
      @CodeDecode  3 роки тому

      We are glad it's helpful. Thanks for writing back Ravi 👍

  • @sunitapawar1819
    @sunitapawar1819 3 роки тому +1

    Nice content.. Thanks

  • @dungeonmaster2844
    @dungeonmaster2844 2 роки тому +1

    Awesome !!

  • @Rimanshu001
    @Rimanshu001 2 роки тому +1

    Good one mam,please continue such videos.

  • @sourabhjinde8191
    @sourabhjinde8191 2 роки тому +1

    Thanks.. that was awesome 👍

  • @puneetsaneja3007
    @puneetsaneja3007 3 роки тому +5

    I think you should also cover hashmap enhancement in java8. i.e from linkedlist to binary tree , when the linkedlist size increses. but anyways, Its nice and expecting more experience level questions on collection

  • @dipabhow4630
    @dipabhow4630 2 роки тому +1

    so nice love it

  • @syedmasood3722
    @syedmasood3722 3 роки тому +1

    Thanks a lot👏

  • @arifpari9561
    @arifpari9561 3 роки тому +3

    You just nailed the Collections . One small request please do video on Collections on Java 8 prospective.

    • @CodeDecode
      @CodeDecode  3 роки тому +3

      Sure will make a seperate video on Java 8 specific changes

  • @rishiraj2548
    @rishiraj2548 Рік тому +2

    5 lakh 48 thousand + views
    Congrats 🎉🎉🎉

    • @CodeDecode
      @CodeDecode  Рік тому +1

      Thanks Rishi for your constant support

  • @maruthupandiyan2549
    @maruthupandiyan2549 3 роки тому +1

    Excellent.

  • @balakrishnagajam
    @balakrishnagajam 3 роки тому +1

    Nice one.. Thanks

  • @sreejak6776
    @sreejak6776 2 роки тому +2

    Pleasr create more tricky questions on collections

    • @CodeDecode
      @CodeDecode  2 роки тому

      sure sreeja we will create soon

  • @AK-tt7fc
    @AK-tt7fc Рік тому

    the video is very usefull . at 3.40 you interchangeably used implements and extends keyword . if possible correct that .

  • @ankush_in_sync5998
    @ankush_in_sync5998 Рік тому +1

    Thank you. Keep it up.