Strings and StringBuilder in Java

  Рет қаралды 374,538

Kunal Kushwaha

Kunal Kushwaha

Күн бұрын

In this video, we cover one of the most important topics, Strings and StringBuilder in Java.
We look into how it works internally, various operations, memory management, and some examples!
Take part in the learning in public initiative! Share your learnings on LinkedIn and Twitter with #DSAwithKunal & don't forget to tag us!
👉 Resources
- Join Replit: join.replit.com/kunal-kushwaha
- Complete Java DSA playlist: • Java + DSA + Interview...
- Code, Assignments, & Notes: github.com/kunal-kushwaha/DSA...
➡️ Connect with me: kunalkushwaha.com
=========================================
Timestamps:
0:00:00 Introduction
0:00:36 What is String?
0:02:35 String Creation: string literal
0:03:36 Internal Working of String
0:07:29 String Pooling
0:09:43 String Immutability
0:16:17 String Comparison: ==
0:20:13 String Creation: new keyword
0:22:02 String Comparison: .equals()
0:28:01 PrintStream Class
0:38:12 toString() Method
0:42:47 Pretty Printing in Java
0:47:05 Format Specifiers
0:48:29 String Concatenation Operator
1:00:42 String Performance
1:09:59 StringBuilder Class
1:12:37 String Methods
1:17:50 Palindrome Program
1:26:20 Outro
#strings #placement #dsa #interviews

Пікірлер: 766
@Emoji1970
@Emoji1970 2 жыл бұрын
Hello..kunal bhaiya.... Pehle muje smj nhi aata tha ki kon sa path follow kru kaise kru...and ques. Kis type ke solve kru...but not i am following your course... And i am doing great.. Your way of teaching and set of ques. which you are giving is perfect.🔥🔥 Main things is you are giving a excellent path to master in dsa. thank you soo much ❤️💯
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Glad I could help!
@chennayaianjc3306
@chennayaianjc3306 2 жыл бұрын
@@KunalKushwaha pls help us..... ignore the things said by others and criticize you and focus on what we want..which makes us happy...do continue your good work...like you said " Time will Tell"
@pradeepkumar00077
@pradeepkumar00077 2 жыл бұрын
@@KunalKushwaha Bhai 🙏🙏🙏please guidance playlist maat hatao please 🥺
@pradeepkumar00077
@pradeepkumar00077 2 жыл бұрын
@@KunalKushwaha bhaiya plz maat hatao guidance playlist
@pradeepkumar00077
@pradeepkumar00077 2 жыл бұрын
@@KunalKushwaha please please
@High.with.Lights
@High.with.Lights 2 ай бұрын
If you have any doubt....🙃🙃 don't worry we will cover it in Object Oriented Programming😉
@jatin6107
@jatin6107 2 жыл бұрын
Can't Believe I was waiting for a Lecture To drop, turning into a geek for Java
@ranaswami5389
@ranaswami5389 2 жыл бұрын
What an amazing work you are doing Kunal. I wish I had a mentor like you during my first year of engineering. Learning DSA from your bootcamp and it's amazing. Thank you so much Kunal. You are amazing❤️
@aradhyapatro3796
@aradhyapatro3796 2 жыл бұрын
Amazing String session, now will spend the rest of the weekend doing leetcode questions after watching these lectures it makes me really confident
@Spider-Man_67
@Spider-Man_67 2 жыл бұрын
Kunal, I'm amazed by your explanation of strings. Previously I had followed other YT channels for DSA but they all are nothing in front of your playlist, I can surely vouch for this playlist. Thanks, Buddy...!!!
@raghavsharma4195
@raghavsharma4195 2 жыл бұрын
I believe in kunal kushwaha supremacy
@srishtigureja6534
@srishtigureja6534 2 жыл бұрын
Never understood the need for/ use of StringBuilder in class 10 (ISC board). Thank you for the time and efforts you're putting in for us; You are BIG!
@sachinmulgir4898
@sachinmulgir4898 Жыл бұрын
following your videos since a week and mannnn........you haveee done someee great job here...the best part is that you cover all the topics in depth, like memory allcoation, the internal working of the program, what classes and objects java has in it and how it helps us to perform any action. like in this video only the way you've explained the concept of println and how it calls toString() and our output is printed. Just wow man....keep it up.......happy that i found your course on youtube. thanks a lot......
@shofiyabootwala2094
@shofiyabootwala2094 2 жыл бұрын
When you ask a question while teaching, we cannot help but shout the answer out loud!! Awesome string tutorial as always. I have never studied String to that depth.
@pavan5524
@pavan5524 2 жыл бұрын
Watching this video, 1.5hour flew by and felt like just 10mins content! That's how teaching is supposed to be! Doesn't make you feel bored.
@akshayasalaskar9102
@akshayasalaskar9102 Жыл бұрын
Thank god I am not wasting my time and I am following this course right in the beginning of my learning journey. I will surely post over here again when I get a job. Thank you Kunal for this content.❤❤❤
@techforpeace38183
@techforpeace38183 Жыл бұрын
The charming thing about your tutorial is even if the topic is known to me, I gather some new, in depth knowledge every time.
@harshshiyani1011
@harshshiyani1011 2 жыл бұрын
I learned in java at the level of JSP and servlets. So, I confidently tell you that if you want to learn String and StringBuilder classes very deeply, you are at the right place. Keep Learning. Kunal you are doing great work, Keep it up.
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Thanks for sharing!
@chandan-ew4rp
@chandan-ew4rp 2 жыл бұрын
from where did u learn JSP and Servlets? Will u share link?
@krunalsolanki749
@krunalsolanki749 2 жыл бұрын
@@chandan-ew4rp what is jsp and servlet
@yatharthnigamece19f19
@yatharthnigamece19f19 2 жыл бұрын
So much information in one video. Had to make a lot of notes as each line felt important 😂. Awesome lecture.
@KunalKushwaha
@KunalKushwaha 2 жыл бұрын
Glad it was helpful!
@v-keydixit2231
@v-keydixit2231 Жыл бұрын
Bhai...bhai bhai....kyaa cheez hai ye course ....koi imagin nhi ke skta ki kitni shan bhasha mai aap sikha rhe hai...aapke sikhane ka tarika..aur aapki knowledge dono hi ... beyond the imagination...🙏🙏🙏🙏❤️❤️❤️❤️❤️
@guyswithhoodie3572
@guyswithhoodie3572 2 жыл бұрын
With due respect to "Durga" sir. I have seen the similarity of the explanation and much better and how the things works internally. While the repetition is there in durga soft classes but you have made much easier to follow this one and stick to this course until completion. Hats off!!!
@user-pk4sr7ww9k
@user-pk4sr7ww9k 4 ай бұрын
Your pure intention is what that make's your explanation clear your selflessness reflects in your videos...Thanking you with my all heart
@swayam50
@swayam50 2 жыл бұрын
This is some amazing stuff, I've never really seen in more depth anywhere else. ❤️
@nomadshubham3907
@nomadshubham3907 2 жыл бұрын
To all Kunal haters::: Dont take him in a wrong way and misinterpret him. He delivers faboulous content for free and you all are jealous of him.. Please mantaim dignity 😀 and stop being jealous..
@study-glimpse7429
@study-glimpse7429 Жыл бұрын
Hey, kunal you are really amazing man. I understand everything here, in my college when I studied these stuff, I fill that this is not for me. But now I am confidently say that This is for me and I'm for this. Thank you very much. I am following you since last 6 months.
@chaitanyaagarwal3569
@chaitanyaagarwal3569 2 жыл бұрын
Great lecture on strings in so much depth. I highly recommend your course to all my friends in college. Great BootCamp. Thank you for all of this.🤩🤩
@arvindkumargupta8856
@arvindkumargupta8856 Жыл бұрын
I don't think nobody can teach like you with great content..ab lag rh hai ki zindagi me kuchh bara hoga🙏
@ravinajalondhara8756
@ravinajalondhara8756 Жыл бұрын
i tried many courses of data structure from youtube but you are the best...you said it and you meant it
@shreyasshenoyt8776
@shreyasshenoyt8776 2 жыл бұрын
This playlist is very very good.. Kunal bhai pls thoda jaldi videos daal karo..it will help me in placement studies..mera placement chalu hai abhi..
@anshukumar7652
@anshukumar7652 2 жыл бұрын
yes
@rishitamandal2492
@rishitamandal2492 Жыл бұрын
I am following your course... And I am doing great.. Your way of teaching and set of ques. which you are giving is perfect.🔥🔥
@mohsinkhan973
@mohsinkhan973 2 жыл бұрын
Your way of explaining is really good. While delivering lecture by kunal I feel in class with full of attention and eagerly waiting to know more concept. At last Real Gems of our Country. Thank you @Kunal.
@Dev3z
@Dev3z 11 ай бұрын
notes 47:55 48:10 55:29 , 58:39 --> + operator can be only used if one of them is string complex object + string || primitive + string ---> object will be convert to string using to string method in println. 1:03:43 -> new object created everytime 1:11:54 String Converting into character array 1:13:20 1:13:26 Original one is not changed, new object is created. 1:13:56 Index of 1:14:40 Split array 1:16:59 Palindrome 1:24:43
@adarshkaushal3867
@adarshkaushal3867 7 ай бұрын
Great!!
@karthiknair1430
@karthiknair1430 6 ай бұрын
digital bad handwriting
@harryharry2922
@harryharry2922 2 ай бұрын
did he explained about memory allocation and management? if yes in which video or lecture?
@AnshulPrakash-jf5jq
@AnshulPrakash-jf5jq Ай бұрын
thank you for these timestamps
@Dev3z
@Dev3z Ай бұрын
@@karthiknair1430 😂man
@sivagiris8175
@sivagiris8175 2 жыл бұрын
I have never seen these kind of teaching throughout my carrier#Keep Posting More Kunal Thank you so much... 🙏🙏
@pratikmore7258
@pratikmore7258 Ай бұрын
Every solid and clear explantion , without making confusion.
@Raj-pi1pl
@Raj-pi1pl 2 жыл бұрын
only 10 mins to the video yet so much info about STRINGS . Really a very helpful video
@bikramkoley6660
@bikramkoley6660 2 жыл бұрын
Thank you Bhai, I am a Mechanical eng student and that is the first bootcamp I am following for my placements bcz I don't have much time I am already in 6th sem, so I don't know why but I am blindly trusting on you, and the qua;ity here is really next level
@Helly_Patel
@Helly_Patel 2 жыл бұрын
Thanks for teaching us like no one did till now!! One small request, please make lectures on dynamic programming as well!!
@tejasnimbre9197
@tejasnimbre9197 Жыл бұрын
having learned java in depth i can assure that this explanation of java string is the best because without knowing internal working of object, reference, heap etc it is impossible to understand strings in java.
@aayushrajwade6039
@aayushrajwade6039 2 жыл бұрын
Wow !!! This kind of in depth knowledge is just awesome. Kudos to you bro ........long live the community !!!
@mohammedhassan8986
@mohammedhassan8986 2 жыл бұрын
Please make a roadmap to open source contribution. Required skills, languages etc. Thank you.
@shoaibkhan9644
@shoaibkhan9644 Жыл бұрын
awesome playlist Kunal more entertaining than a Netflix movie 😂 and icing on the cake is your notes. thanks for your hard work.
@groweveryday6322
@groweveryday6322 2 жыл бұрын
please bhaiya, don't remove your videos . There are some person who doesn't wann good of tier 2 or 3 student... your video was so helpful to choose what to study and from where to study and where will we just waste our time..... please don't remove such pure content....Your videos save lots of time of a tier 3 engineering student specially your live and guidance videos.. it's humble request because of some person ,u just don't change your way of guidance.. we need your guidance bhaiya.....You are one of those teacher who speaks truthfully, that too without being afraid of anyone..please don't give much importance of haters.. please 🙏🙏🙏🙏🙏🙏🙏
@shabazalam2374
@shabazalam2374 3 ай бұрын
Bro your assignment is far better than other DSA sheet.
@sakshamsharmaTech
@sakshamsharmaTech 2 жыл бұрын
This made my day. Learning is so so easy. Love your work. Thank you.
@The_Process_
@The_Process_ Жыл бұрын
Hello man, thank you so much for the time and effort you're putting into making these videos. They're really appreciated. with love from Nigeria.
@Aakashkumar-xc2ck
@Aakashkumar-xc2ck 2 жыл бұрын
Hello Kunal bhaiya Plz don't stop to upload the guidance video because the video help us more to be on a right path. Plz ignore those bad insect of society who just try to ruins someone and your dreams. Plz ignore them who make controversy about you without any proof. You are our inspiration and your journey motivated us plz don't stop guiding us because apke video se kisi ek ka bhi bhala ho raha hai thi app sahi ho or app ho hi best love you bhaiya plz be what you are don't let these bad elements of society change you and what you want to do for us and the community. Guys if you also think like me then lets show the power of supports of kunal bhaiya.
@pulkitsingh6083
@pulkitsingh6083 2 жыл бұрын
Yes bhai....vo sab log to tier 1 College se h but i am from tier 4 college need these kind of guidance 🙏🙏🙏
@gauravpatel2695
@gauravpatel2695 2 жыл бұрын
you are gaining so much respect from doing this bro keep it up. I really enjoyed this session
@AmitPatel-ok5ct
@AmitPatel-ok5ct 2 жыл бұрын
Thank you so much buddy. I saw your videos to recall the all concepts learned during my engg. Very well explained. 💯
@shankarlalsharma3674
@shankarlalsharma3674 29 күн бұрын
Point to remember, 51:06 -> sysout(“a”+1) //output: a1, here integer will be converted to wrapper class Integer that will call toString() method
@muskanbharti1224
@muskanbharti1224 Жыл бұрын
Please complete the series. You are the only one who I trust
@AmanKumar-hv4hb
@AmanKumar-hv4hb 2 жыл бұрын
Really helpful no one explained all this stuffs in this way. loving to get more things.
@raghavsharma4195
@raghavsharma4195 2 жыл бұрын
I already know java but still watching your vids bcz i learn something new in every vid. Thx
@anishakumari6517
@anishakumari6517 2 жыл бұрын
You are really doing a great work. Most importantly, you take out time from your schedule to make lectures for us. That's really commendable. I am very grateful to u.
@CineSavvySoul
@CineSavvySoul Жыл бұрын
this series is supposed to be completed
@technicalexpertise
@technicalexpertise Жыл бұрын
You are very hard working to explain us these concepts. You are awesome teacher👍👍. Happy Teacher's Day.
@harshagarwal2757
@harshagarwal2757 2 жыл бұрын
"If you are watching after 1 month,then the OOP videos are already there...." The level of confidence this guy has (Hats off)...
@rishusn597
@rishusn597 2 жыл бұрын
Exemplary teaching. Damn! This is making me fall in love with Java.
@pretayy_purple
@pretayy_purple 4 ай бұрын
Hello Kunal Bhaiya, After any concept you say "Simple Stuff" but it's YOU, who makes it simple! You make the concepts simple and easy to understand, and all the "simple stuff" gets imprinted in the mind! Thank you so much for all these videos! I'm very grateful to have learned the concepts by watching your videos. Thanks a ton! ❤💯
@prasantmahato4645
@prasantmahato4645 2 жыл бұрын
Your are creating a new change . Thankyou so much .Please keep going, and let this down we have big hope from you please
@omkarkalepu1208
@omkarkalepu1208 2 жыл бұрын
Tomorrow, I have an exam still couldn't resist myself from watching this video!
@diveshkumar8025
@diveshkumar8025 2 жыл бұрын
Happy to hear you back.
@sanimpandey5728
@sanimpandey5728 Жыл бұрын
Everytime Kunal asks for like, share and comment , I immediately pause the video to do so. This is my respect for the course
@dannyboy3413
@dannyboy3413 2 жыл бұрын
Brother you saved my life...Thank you so much ❤️
@AMANVERMA-bq8hj
@AMANVERMA-bq8hj 28 күн бұрын
Thank you so much Kunal Sir for your amazing teachings ! I like to binge watch your DSA videos now :))
@lostt3435
@lostt3435 2 жыл бұрын
Hey Kunal i loved the video and a good thing abt ur video that it makes me want to watch it because i think that i learn a lot without getting bored. Please also make a separate video on string questions so that we can get a idea how to solve the questions.
@ashd6660
@ashd6660 Жыл бұрын
Thank you so much Kunal Bhaiya !💙 I'm just started to learn java..& your explanation is outstanding.& I understand better because of your teaching method. Thank you ❤️
@aritrachatterjee147
@aritrachatterjee147 2 жыл бұрын
Hey Kunal as always OP video ❤️, just a small suggestion apart from your suggestions if possible try to attack some question links of hackerrank or interviewbit for respective topics ❤️
@yellAtMe.
@yellAtMe. Жыл бұрын
I am really liking this change about myself, the urge to urge to write more JAVA codes after learning from your lectures.
@GaganSingh-zz9el
@GaganSingh-zz9el Жыл бұрын
exactly
@chinmaychaudhari4143
@chinmaychaudhari4143 2 жыл бұрын
Hey bro really great work for us bro We really can't afford it by doing classses in any street ..... U r giving free education that's a really great bro thank uhh...
@sureshgoudappanavar382
@sureshgoudappanavar382 3 ай бұрын
U r literally awesome Broo... Thanks for teaching this much of things in one bootcamp🙏🙏🙏🙏🙏
@btechwallah-uttam9407
@btechwallah-uttam9407 Жыл бұрын
amazing string video I discover a lot about String. I am now capable of handling any DSA question related to String. Thanks !!
@ARYANKUMAR-gz2qw
@ARYANKUMAR-gz2qw 2 жыл бұрын
Once again, Thanks for this course Kunal. This is really helping us a lot.
@Vartmaan4322
@Vartmaan4322 2 жыл бұрын
Amazing! lecture , all doubts and concepts cleared in one go.
@abhishekr9946
@abhishekr9946 8 ай бұрын
Detailed explanation, even a non IT background can easily be master in Java if they follow this Java playlist sincerely
@albingeorgekurian4396
@albingeorgekurian4396 3 ай бұрын
So much content in one short great. Thanks for your efforts ...
@shivprakashtripathi8028
@shivprakashtripathi8028 Жыл бұрын
Hi , just adding a comment, not sure might be useful for someone. I got confused earlier, related to how many objects get created. The code String a1 = new String("Hello"); creates two objects in memory: 1. A string literal "Hello" is created in the String pool. When the code is executed, Java checks the String pool to see if there is an existing string literal with the value "Hello". If there is, it will reuse it. Otherwise, it will create a new string literal "Hello" in the pool. 2. A new String object is created on the heap using the new keyword. This creates a new instance of the String class, which contains its own copy of the characters "Hello". Since a new object is created, it has its own memory address. Thanks !
@animeweeb7009
@animeweeb7009 Жыл бұрын
where can i find the questions video of string?
@krushalipatel-xs7xj
@krushalipatel-xs7xj Жыл бұрын
it is useful for us thanks ☺
@shantahiremath7313
@shantahiremath7313 2 ай бұрын
Thank you so much, Kunal Sir. So grateful to you.
@shreyaomer675
@shreyaomer675 4 ай бұрын
You are Amazing Kunal Sir💜. I was feared about how i will do DSA and stuff. But Luckily I found you..that's the best thing happens to me this year. Thank You for so much effort.❤
@sweetyprasad287
@sweetyprasad287 Ай бұрын
I am feeling more confident now! Also, I am enjoying these videos you are doing great! Going deeper into everything, loved it!
@snehathomas2064
@snehathomas2064 2 жыл бұрын
Kunal really grateful for your videos 💯,it is so true that there is no such playlist especially for Java anywhere else in You Tube, I'm quite sure for that.... The important thing i want to mention is about your videos for Recursion... You're damn right when you say that if you can't explain it no one can !! Please keep making videos like this and eagerly waiting for your videos on graph and tree data structures... One more request can u make a video dedicated to only dynamic programming concepts ,memoization as such...will really be helpful!!
@Securitywasted128
@Securitywasted128 10 ай бұрын
Great Explanation Kunal i don't learn C language as much consistency as Learning Java From your lectures. Thanks again Bro
@rohanchoudhary4034
@rohanchoudhary4034 2 жыл бұрын
After array was waiting for String video, man you have cleared many doubts In Array wala video, this string video is also great
@uchiha__madara
@uchiha__madara 2 жыл бұрын
Thanks yaar Kunal. Life bna rhe ho. you have all the best wishes from us
@mysteryman2213
@mysteryman2213 Жыл бұрын
Thanks for all these information i noted down all the key takeaways from this lecture it was fun knowing the internal working of the print function as well....
@sanskargoyal4901
@sanskargoyal4901 2 жыл бұрын
Top class content....bhaiya don't stop the guidance videos..plz!
@harshverma1316
@harshverma1316 2 жыл бұрын
Thankyou for the detailed explanation The way you teach is just awesome it hits directly on my brain stimuli🤗😚😊🤓
@RiteshKumar-ge5ee
@RiteshKumar-ge5ee Жыл бұрын
Very good explanation. "==" vs ".equals" is a frequently asked question in Java and .net interviews in service based orgs.
@anurag-pathak10
@anurag-pathak10 2 жыл бұрын
Our java knowledge getting stronger day by day 💪
@khyatisharma2565
@khyatisharma2565 2 жыл бұрын
Thankyou so much Kunal for providing such a great content , Kindly please upload the video on leetcode questions as u did in Binary search. Thankyou so much 🙏
@japmeetsingh635
@japmeetsingh635 2 жыл бұрын
love the way you teach concepts so easily. Bss DSA Padhne ka man karta rehta h 😂
@vaibhav_kubal
@vaibhav_kubal 7 ай бұрын
Thank you so much for teaching the strings topic in such an engaging and informative way! Your explanations were clear and concise, and I really appreciated the examples you provided. I feel much more confident in my understanding of this topic now. Keep up the great work!
@KunalKushwaha
@KunalKushwaha 7 ай бұрын
Glad it was helpful!
@131_suruchi9
@131_suruchi9 2 жыл бұрын
Amazing as always!🥳
@tapashnalge6703
@tapashnalge6703 2 жыл бұрын
Bhai strings ka hi wait tha .. thanks bruh🎉🎉
@harjitsingh1828
@harjitsingh1828 Жыл бұрын
So much information in one video. Awesome lecture. from Punjab
@girirajtomar519
@girirajtomar519 2 жыл бұрын
Again great & fun lecture. The best thing I learnt is diff b/w String & StringBuilder;
@gulzhasmailybayeva4587
@gulzhasmailybayeva4587 5 ай бұрын
You are really doing a great work. Thank you so much!
@AkshatJain-vn3xu
@AkshatJain-vn3xu 3 ай бұрын
great video i used to struggle while doing string questions but this video has made it easy for me
@simranarora2817
@simranarora2817 Жыл бұрын
Thank you so much, words won't be enough to express the gratitude....
@sohelshaikh2697
@sohelshaikh2697 2 жыл бұрын
Thank you for this amazing series.
@AshishPandey-sv4nr
@AshishPandey-sv4nr Жыл бұрын
Thank you so much Bhaiya....bs aap help kerte rahiye yesse hi..... it is very precious for us .🙏
@Mayank_Shelar
@Mayank_Shelar 2 жыл бұрын
Your efforts are remarkable kunal Great content
@arnabchakraborty246
@arnabchakraborty246 2 жыл бұрын
Great video.. please don't be disturb by non sense outside.. please continue this level
@aryatyagi7301
@aryatyagi7301 2 жыл бұрын
Great content. Was waiting for this
@satnamsingh3801
@satnamsingh3801 Жыл бұрын
May you live a thousand years , thanks for all of your teachings . I will dedicate my first salary to you . 😃
@cricketguru8284
@cricketguru8284 3 ай бұрын
A very good lecture and great explanation .....i have not seen this kind of deep lecture delivery anywhere
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 6 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 21 МЛН
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 6 МЛН