Java String interview Questions and Answers with example| Immutable | Most Asked | Code Decode

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 165

  • @anooppressboltme2477
    @anooppressboltme2477 2 роки тому +111

    I am mother of 2 year old toddler and 4 years gap in software field. Because of ur videos I have cracked interviews. Thanks a lot 🙏

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

      So glad to have you back in IT industry 🎊🎊🎊🎊many congratulations on clearing interviews. M sure u will rock 🤘🤘thanks a lot 🙂🙂

    • @Rajshimishra123
      @Rajshimishra123 2 роки тому +8

      Same case with me hope your videos help me to clear interview plz pray for me

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

      So happy to know that a mother with gap has cracked it. Thanks for sharing and inspiring others as well.

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

      hi dear am trying to join as how u prepared pls let me know

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

      Yes...True..your videos are very helpful and easily understandable .Great Job. Many Thanks :)

  • @kalekar100
    @kalekar100 2 роки тому +46

    I have cracked multiple interviews purely based on your videos only. Be it core java, streams, spring , boot, hibernate. Since then I have been watching your videos as soon as they are uploaded and have recommended my friends to do so. I think what offer I have earned today is entirely based on your efforts and credit goes to you.Very grateful to you mam 🙏🙏and excited to watch your new initiatives. Please keep going.

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

      Many congratulations Sourabh. Well deserved Man 👏👏👏👏👍🙂🙂. Keep shining keep rocking. Thanks for supporting us 🙂🙂

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

      @@CodeDecode all thanks to you maam 🙏🙏

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

      Anytime Sourabh. U are a champ 👏👏

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

      ++1
      even i am in similar in a similar position thanks @CodeDecode ... my JAVA knowledge has been improved a lot.

  • @kalavaguntahridayasaivalli4867
    @kalavaguntahridayasaivalli4867 6 місяців тому +3

    I never comment on yt videos but I want to say I became a fan of your teaching... I'm on a spree watching your videos and it is helping me a lot in my professional upskilling. Thanks a lot Mam! ❤❤

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

      Thanks for such a beautiful comment 😊 all hard work is paid off seeing such nice words 😊 keep learning keep shining 🌟🌟

  • @Sunilkumar-jn7ci
    @Sunilkumar-jn7ci 2 роки тому +1

    Very Well explained !.
    Just want to add for last example , when you do concatenation of s1 + "decode" , it actually creates a new object for "decode" and than "CodeDecode" , after the 2nd line there will be 3 objects in string pool.
    Thanks for reading , correct me if you think differently.

  • @akashsaha9366
    @akashsaha9366 2 роки тому +4

    Awesome. Please make us more strong to clear any java interview question without going to any other channels.

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

      We hope n target the same Akash 🙂🙂👍👍

  • @vasundharachintha5037
    @vasundharachintha5037 11 місяців тому +1

    This is really really helpful. Got all my doubts cleared related to Strings in java with this one.

  • @rohan_040
    @rohan_040 Місяць тому

    Please cover the most commonly asked string coding interview questions and arrays in depth, along with coding and interview questions.
    And thanks, your teaching skills are awesome. My topics related to strings are now clear.

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

    Excellently covered end to end complete string concept...

  • @suyashgupta6480
    @suyashgupta6480 2 роки тому +4

    please cover the most asked string coding interview questions.
    Your content is awesome!!
    Thanks for the hardwork

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

      Thanks for showing us thr path Suyash. We will cover it in next video now 🙂🙂👍👍

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

    Your concepts are very clear.. You are making really great videos for everyone. Pls do make the video on string coding questions as well. I want to suggest one example as well which i have been asked in my interview. I had to replace the vowel with the number of occurrences let me explain with example... Suppose there is a string as opportunity so i have to replace o with 2, u with 1 and i with 1 as well because, as you can see that the vowel has been replaced with the number of occurrence, i was also asked to iterate an string using map for this logic.
    These type of questions can also clear many concepts and help to think big and build the logical thinking. I belive you will be making a video on that as well with great examples.
    Thanks for making such a great content for everyone. Really appreciated. 😄😄🙌

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

      Nice question harsh. Sure we will put video on that. Thanks 🙂🙂👍👍

  • @manishagarwal1505
    @manishagarwal1505 2 роки тому +5

    Thank you for your Great work!! These videos are short and to the point and good to brush up concepts before interviews, keep up the good work!!

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

      Thanks a lot Manish 🙂🙂👍👍

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

    Excellent video! Just to the point and lots of important learnings to take away from this video! 👍👍

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

    Very very Nice Explanation mam. Please make series of java interview questions
    Array. Loops. Oop and collection framwork.

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

    Thank You so much ma'am . Can't really appreciate you guys enough for all the efforts that you put in . Helps so so much for interviews , pretty much looks like interviewers too just pick up questions from your channel 😅 . Thank you again and as usual looking forward to many more videos .. 🙂

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

      Thanks a lot Shweta 🙂🙂👍👍

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

    Appreciate your way of explaining everything is really unique and easily understandable

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

      M glad it is Rani. Thanks a lot 🙂🙂👍👍

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

    hi mam..what a clarity! Am one of ur great fan...love to study your videos...
    Please add string programming interview qwestions also..

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

      It's live Priyanka. Thanks for suggestions. It really helps 🙂🙂

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

    Ditto same questions were asked to me in one of the interview, 👌👌

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

      Sure that Kavita. Thanks for letting us know and helping the community

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

    very informative and useful video.

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

    Thank you..very informative, helpfull tutorial with easy explanation and best examples 👍👌

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

      Thanks Jainam 🙂🙂👍👍

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

    thx a lot for explanation, watched a bunch of videos, your's was the best

  • @ArjunSingh-is1bg
    @ArjunSingh-is1bg 2 роки тому +3

    Daily upload karo core java interview questions

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

      Sure Arjun. We will try to do that. It's just that we all are working IT professionals. We have hectic sprints in agile format. It's difficult to spare time at late hours in night. But sure we wil try to put more videos. Sorry for the inconvenience. 🙂🙂

    • @ArjunSingh-is1bg
      @ArjunSingh-is1bg 2 роки тому +1

      @@CodeDecode Hey Thank you for response i know about IT Working schedule , try to upload videos when you have free becoz i will regularly follows you

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

      Yes will try to increase video frequencies 👍👍thanks for the nice suggestion Arjun 🙂🙂

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

    Appreciate your way of explaining everything is really unique and easily understandable....Thank YOU😇

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

    Greatly explained ❤

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

    Awsome Explanation..Great job🎉

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

    Thanks for this valuable information

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

    Very informative. Thank you!

  • @Shankar-lz7zs
    @Shankar-lz7zs Рік тому +1

    Nice explanation Mam

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

    Thank you so much ma'am...it's ultimate explanation 🫡

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

    गुरू ब्रह्मा गुरू विष्णु, गुरु देवो महेश्वरा गुरु साक्षात परब्रह्म, तस्मै श्री गुरुवे नमः

  • @SaiTeja-ym2er
    @SaiTeja-ym2er 2 роки тому +1

    thanks for sharing knowledge.

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

      Thanks Sai 🙂🙂👍👍

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

    Nice information..

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

    We need to some other videos Please make on the toString topic immediately
    Topic should be string, stringbullder, stringbuffer , immutable and mutable
    Etc

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

    Yes mam make this type of video

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

      Sure Shashank 🙂🙂👍👍

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

    Excellent question

  • @testingvinod9545
    @testingvinod9545 5 місяців тому

    One que: if unattended 'code' created while creating obj then what is the use of unattended 'code' where we can use ?

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

    Hi There
    I have one question here, if we create any object using new keyword then it will allocate memory in heap area and in SCP also. So that for further use it will pick that value from SCP means for reasubality.
    Then my question is why we are storing that value in heap. Why we are allocating two memories for same value. Will it not consume the memory?
    Please suggest.

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

    Very informative video

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

      Thanks Supriya 🙂🙂👍👍

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

    Thank you for the detailed explanation, please help with my interview question, for String input “hello world” and increment counter=2 , output will be - “jgnnq yqtnf”

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

    Hello! Thank you very much for your videos!
    I have one question, because I didn't quite catch while watching it. Why is an unreferenced object in String poll, which is created by the "new" keyword along with its value in heap memory, not collected by the Garbage Collector?

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

    Thanks for such awesome content 🙏🏻👍🏻

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

    When was string constant pool introduced? Or is it der from beginning of java?

  • @rajashekar-bu8xd
    @rajashekar-bu8xd 2 роки тому +1

    Good video, keep up the good work

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

    Thanks Medam

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

    Nice work mam, Plz you will make a video in string interview questions and program

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

      Thanks Shubham 🙂🙂👍👍 we will do that in next video 👍👍

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

    @8:25 If it creates one more object in string constant pool, will it be a extra memmory consumption if i don't use it in the future?

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

    I would like to suggest some topics on which I haven't found simple and easily understandable videos inspite of rigorous searching.
    1) Executor framework
    2) Microservices design patterns like CQRS using Axon framework, event sourcing.
    3) Resilience4j for Microservices (specifically bulkhead. I couldn't find a single video which could make the concepts clear).
    4) Reactive programming in java.
    I am really waiting for these. And I very much trust it's possible for you alone to make us understand it from grass root level. I haven't found appreciable content on UA-cam. I am a regular follower of your content.

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

      Sure we will put video on them👍🙂

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

    Mam, I have one question.
    As u said in string constant pool, garbage collector doesn't work then how memory are managed in scp?

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

      It will be cleaned as soon as your jvm stops

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

      But if I have an enterprise application where the app is never stopped, in that case will it not lead to memory issue?

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

    please make one video on string coding interview questions

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

    Thank you

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

    Awesome content as always.. waiting for Executor tutorial. There is really no good and understandable tutorial on this topic. It will be very useful for us. Request you to make a video on that topic.

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

      Thanks a lot Manogna. Sure we will put video on threads soon 👍🙂

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

    thank you ... please make a video for the array as well.

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

      Thanks a lot for helping us in deciding priority Shubham 🙂🙂👏👏

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

      Yes please create video on array interview questions

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

    That's why usernames & passwords can't be as Strings as they can be hacked from String constant pool 🙂

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

      Yes i was about to cover that in next part 🙂👍

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

    Thanks a lot

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

    Thanks

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

    String S1 = "Code ";
    String S2 = "Decode";
    I just wanted to know that in this case how many objects are created? For string s1 in String Constant Pool. For, string s2 it will create an object in heap memory and the literal is stored in String Constant Pool as well is it right?

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

      Only in SCP..Not in heap .As it's not created with new keyword

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

    Thanks.

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

    Ma'am please make videos on string and array coding questions. I have given many interviews. Just because of array and string coding I couldn't clear any of them.

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

      True Lavish. We will now start with coding interview questions on string n arrays

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

      @@CodeDecode Thank you 😊

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

    Thank you ...

  • @vivekvivek-nn1xo
    @vivekvivek-nn1xo 2 роки тому +2

    One crappy interviewer asked me exactly same questions. She at the end said that these are most important fundas of java and didn’t selected me 🤨

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

      Happens Vivek. It's part of our journey. Keep giving interviews and m sure u will clear it. 🙂🙂👍👍keep learning prepare well and things are just at one hand distance for u Man 👍👍

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

    nice exp

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

    Please cover string coding interview questions

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

    Thnk u mam

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

    Ma'am plz tell me one thing , if SCp method is superior..then why do we use of new keyword object ?? Plz reply ..it is interview question

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

    Make Video On Android Developer 1 Year' Ex Questions And Answers ..

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

    Can u make core and advance java video from scratch. It will be very helpful. I am suggesting ur videos to friends too

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

      ua-cam.com/play/PLyHJZXNdCXsfqAkteaQ6JfZ_IHvxX-Hj3.html
      Here you go Kasaram 👍

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

    Please make video on Executors

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

      Ok we will put video on Executor framework Saan 🙂🙂👍👍

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

    Can you make core java course on udmey platform.

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

      Sure we can do that saan 👍👍

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

    Can you make video on Executor Service . Please

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

      Ok sure we will do that 🙂🙂👍👍

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

    Please upload coding interview questions.... It's a request... Pls

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

      Sure Shrikant. Thanks for helping us in deciding what's important next 🙂🙂👏👏

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

    thanx

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

      🙂🙂👍👍

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

      This channel is really a true gem.... The way you explain things makes it to easier to understand, i guess i almost spend 5 hours a day learning over your channel .
      Thanks allot for all of this efforts that you put❤❤

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

      @@CodeDecode i really don't know your name mam😊 but m sure this channel will grow as hell if you keep doing this🤗

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

    Where does it says String s = new String("hello"); creates 2 objects one in Heap memory and another copy in string constant pool. Is there any proof to it (like in java doc)? I just want to clarify it. I am learning this concept from many coders saying it created two objects but how can i be sure it creates 2 objects?

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

    I will be great work for developers

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

    I was recently asked this question in interview. Can you pease help me with answer. Question: what check is happening internally to decide to create new object in string constant pool or to return the reference of object. Also what design pattern is used by string.

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

      I have answered it as equals() method. But the interviewer asked me, if I have many literals in string constant pool then doesn't it take time to check equals() method against each literal to identify the matched value. I didn't have answer for it

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

    If scp not eligible for garbage collection then is there a limit how many literals we can create bcz it also takes memory can you vlear it ?

  • @start1learn-n171
    @start1learn-n171 9 місяців тому

    Tq

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

    If new keyword creates string in both heap and scp then qhat is the purpose of intern?

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

    Hi Ma'am ..I have one project with errors wil u help to sort it out

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

    Really it is 38 degrees celsius in your area?

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

      Yeah. It was hot here at that time. 🙂😀

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

    What happened in below case
    In memory
    String s="abc";
    s="xyz";

  • @harshithac-e9n
    @harshithac-e9n Рік тому

    String a="abcdef";
    String b="dghijk";
    String c= "lmnopa"; can any one help me from these 3 strings to be compared and find duplicates in java8

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

    Can you make videos in Hindi or telugu aslo mam

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

    i didnt undersatnd why String str = new String("Decode") creates 2 object?

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

    Plz mam soft copy provide this video

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

      Sure. We will put how much are allowed in description below

  • @fkb_ali
    @fkb_ali 4 місяці тому

    very well explained. thank you! but can you please not scream

  • @AVINASHSHARMA-hu3vm
    @AVINASHSHARMA-hu3vm 6 місяців тому

    Hi everyone please read this
    Last March 2024 I layoffs from company and I have only 1 year experience in java developer. I try to many companies but not scheduled my interview please help me. it's been 2.5 months