Top Tricky Java Interview Questions and Answers | Java Interview Questions and Answers | Code Decode

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ม.ค. 2025

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

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

    Well done. I like (majority of) the questions. Interviews in India need Q & A type like this. In overseas people ask questions from their project to know the interviewee ideas from a practical point of view.

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

    Recently ,I had a interview for JAVA... And interviewer asked the difference between the security provided by abstraction and Encapsulation......could you pls answer it....

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

    You are giving really a wonderful content to the people. Thank you So much .A small suggestion from my side is a small snipped of code can be shown along with audio. That will give a better picture of the topic.

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

      Thanks Sai. Sure, we have live demos in all videos except these quick interview Revision questions . We prepared them just have a quick look before interview. You don't even have to look at your phone number still u have your quick revision done. Rest all videos have Java code demonstrated 🙂👍

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

    Could you please explain the scenarios in realtime applications where we use these Factory Design pattern and Abstract Design pattern

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

    Good thumbnails are good to entering into ur video...and u explain good with example....i just stick to till end....thx lot for ur thumbnails

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

      🙂thanks Chandra 👍👍

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

    Thank you for your videos. A little note on this one, your info about bean scopes is outdated, there are 6 bean scopes now and there is no more global session scope.

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

    Anyhow we are using the != for checking the null pointer exception, then what is the need of using the optional class in java

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

      the Optional class includes methods to explicitly deal with the cases where a value is present or absent. However, the advantage compared to null references is that the Optional class forces you to think about the case when the value is not present.

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

      @@CodeDecode can you please explain in real time or with the example

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

      @@kan123ish sure Keerthana we will create seperate video for that. 👍👍

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

    Helpful for Interview Preparation. Please continue. Mam, could you please explain little more about hashmap changes on 1.8 I.e. what is that threshold value at which the Linkedlist changes to Balanced Tree.

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

      Sure Adwaita, we will create seperate video on this java 8 enhancement. 👍👍

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

      @@CodeDecode okay. Thanks for your quick reply.

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

      Any time 👍👍🙂🙂

  • @Thiru-zt5lw
    @Thiru-zt5lw 2 ปีที่แล้ว +1

    you are doing an excellent job and there is no words to say about your contribution. Really i appreciate you from my bottom of my heart. Great Work ..

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

      Thanks a lot 🙂

    • @Thiru-zt5lw
      @Thiru-zt5lw 2 ปีที่แล้ว

      There is one interview question how will you migrate from structs to spring? How will you migrate from ant to maven? There is 5 million request how will you make sure and what's your suggestion to do scalable and how will you increase your performance.

  • @RamzanAli-vr1ww
    @RamzanAli-vr1ww 3 ปีที่แล้ว +2

    Please, Create more videos for this, It was very helpful.

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

      Sure Ramzan 👍thanks

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

    Really a help please continue with such video

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

      Sure Khyati. We will continue with this series 🙂🙂👍👍

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

      @@CodeDecode 98uyhk

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

    Another great and useful video. . 😊
    Ma'am you said Tuesday you will upload next video on microservices..
    Waiting for that.. 😔

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

      Right Jabir. But got stuck with this video. We are so sorry. We are working IT professionals, it's difficult to spare time for 2 videos in weekends. But it's almost ready we will put that video this week for sure. Thanks for bearing with us 👍👍

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

      @@CodeDecode Thank you for the update ma'am:)

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

    Thank you for the video! When do you resume the microservices? Since it was started last week!

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

    Hey Thank you soo much for the video!!
    Can you explain Why optional class instead we can check for null using == ? This was asked in an interview

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

      the Optional class includes methods to explicitly deal with the cases where a value is present or absent. However, the advantage compared to null references is that the Optional class forces you to think about the case when the value is not present.

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

      @@CodeDecode Thank you!!

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

      @@nagalakshmikesavan9198 👍👍🙃

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

    Thanks for such informative content

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

      🙃🙃👍👍

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

    Please create more.. this is very good

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

      sure we will create more soon.....

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

    Please make more videos like this for advanced questions...

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

      Sure Amita👍👍

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

    Can you please elaborate the function of Optional class with Example. Couldn't understand its functioning.

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

      Ok sure. We will create another video just on optional class

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

    Hi , I have been following all your videos and it's amazing and very helpful , can you please create a tutorial on micro-service docker with MySQL

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

      th-cam.com/play/PLyHJZXNdCXsd2e3NMW9sZbto8RB5foBtp.html

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

    In one of the interview they asked me to sort employee based on id and name? Can please tell how it was implemented in java8

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

      Check sorted Comparator.comparing method and thanComparing() methods

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

      Right Ankit 👍👍

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

      @@ANKITCHOUDHARYankitkrchy I want for 2 employee objects

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

    That was a nice and simple explanation about HashMap enhancement, Spring AOP and Garbage Collection enhancement.
    Can your team create some interview question on DS & Algo ?
    Thanks again for providing the informative content!

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

      Sure Ashutosh, ds algo is in pipeline 👍👍🙂🙂

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

    Thank you so much mam, you have helped me a lot during my preparation

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

      Thanks 🙏🙏this means a lot to us 👍👍

  • @AshishSharma-mf4sg
    @AshishSharma-mf4sg 3 ปีที่แล้ว +1

    Amazing ✌️✌️✌️

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

      Thanks Ashish 👍

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

    Thank you so much mam for all your videos.
    It's really very helpful for the interview preparation.
    Could please creat some more videos on java hibernate and spring

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

      Sure Ushir, we will continue this series👍👍

  • @krishnareddy-ro2rp
    @krishnareddy-ro2rp 3 ปีที่แล้ว +1

    Please do a video on serialization

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

      sure we'll make one soon.....

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

    Awesome video

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

      Thanks Dhiraj 🙂🙂

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

    Excellent

  • @RajYadav-fy4lm
    @RajYadav-fy4lm 3 ปีที่แล้ว +1

    Mam please make more videos for Java 8, multithreading, Spring. I am following your videos for my interview prep.
    Thank you for such content

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

      Sure Raj. If we get proper response we will keep on creating this series

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

      @@CodeDecode yes please upload more videos for Java ma'am. Very useful for interview. Thank you so much...

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

      Sure Santhoshi, we will keep posting video in this series 👍👍

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

    Useful video.
    Can you just tell me how to clear cache in hibernate

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

      session clear() method to clear the cache i.e delete all the objects from the cache. We can use session contains() method to check if an object is present in the hibernate cache or not, if the object is found in cache, it returns true or else it returns false.

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

    Ma'am please upload JDBC and Sql interview questions.

  • @sudheerkumar-tp1mg
    @sudheerkumar-tp1mg 2 ปีที่แล้ว +3

    Feedback is selected

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

      🤓hehe thanks Sudheer. This is funny 😂

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

    Need spring framework interview questions

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

      Yes, that's remaining, we will upload that too 👍👍

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

      @@CodeDecode Thanks for accepting my request

  • @nikhilsharma-kd4pi
    @nikhilsharma-kd4pi 3 ปีที่แล้ว +1

    Thank you so much for these important questions..... Looking forward to get more from you🤞👍

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

      Sure Nikhil 👍👍

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

    these types of question generally get asked in interviews

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

    this interview question is for how much year of exp peoples ? cuz as a fresher don't knw this questions

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

      Right, not all questions are required for freshers, but we were constantly getting comments to increase the level. Hence we increased the level a bit in this video

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

    Can you explain what is spliterator in Java

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

    I ask this question regularly on interview but 80 % candidate fail to answer or not able to explain well.
    Q. Which method will execute if we call method by passing value null. Eg fx(null)
    public void fx(String s){
    sop(1);
    }
    public void fx(Integer i){
    sop(2);
    }
    If you think it print 1 then you are wrong.

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

      public void fx(Integer i) : if argument is int here then o/p will be 1 but its Integer , hence compiler will throw ambiguity error.

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

      answer would be compile time error because the compiler gets confused with which method is being called since both are accepting non primitive data types so null can be accepted by both the methods

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

    Please also show answer on screen
    . Sometimes getting problem in understanding

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

      Sure Monika 👍

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

      Anything like : th-cam.com/video/uUC7ckjgI_o/w-d-xo.html

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

    Try answer little bit slowly ,its too fast to understand what exactly you are trying to say and it's confusing as well

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

      Ok, we will reduce the pace from next video 👍👍

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

      @@CodeDecode thanks...

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

      Thanks for observing and helping us in improving👍👍

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

    Plz come with micro service project.. Waiting

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

      Sure Rahul, next is micro services only then 👍👍

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

    Mam real time project pleaseee

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

    Please explain with code

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

    You did a great job by posting the trending java interview questions. sorry to say this, please don't say NOTHING BUT in every sentence. it doesn't make any sense out there.

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

      Thanks for pointing it our. We worked on it and now it's no more used in recent videos 🙂🙂👍👍