toString Method Java Tutorial #91

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

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

  • @alexlorenlee
    @alexlorenlee  11 หลายเดือนก่อน +2

    If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h

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

    Thank you for explaining just a bit more WHY we do the constructor and how it works. "The constructor determines what happens when an object is created" (or something like that). That was the piece I was missing.

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

    You beauty!!!!
    Best Teacher!!! you teach us not like viewers but as friends. and trust me i was just thinking about toString and was a bit confused and your video popped up and Boom Confusion no more .
    Love You keep it up ♥️♥️♥️♥️

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

      toString() method is the most useful methods in Java. I really like it.

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

      google reaaaaaaaaads your mind

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

    I don't know how you explain things differently than any other teacher, but your videos have been the biggest help in learning this stuff by far, thank you!

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

      It's because you already knew what to expect. Try learning absolutely foreign concepts from TH-cam, you'll be more lost than teachers teaching you their first time. .

  • @chazk.official873
    @chazk.official873 4 ปีที่แล้ว +84

    I always go "awwwwhhh" everytime i watch your videos cause it's in your lessons that i get to understand everything 100%. Thank you 😊

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

    Thank you for the mention Alex!

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

    thank you so much! We started this semester with Java and i was so lost until i found your tutorials. Also I've been looking for a toString tutorial forever!:D
    keep it up!

    • @theblindprogrammer
      @theblindprogrammer 4 ปีที่แล้ว

      I love the Java language! If you have any challenging problems, please post. I will help!

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

    Finally!!! I was going bonkers trying to figure out toString. I had an inkling I needed a new class, but had no idea how to do it. Thank you.

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

    Thank you very, very, very much. You have helped me and reached my goal👏

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

    You make things so much more clear and concise. I salute you big dawg, pls keep these coming.

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

    Recently decided to try out java and found your channel. thanks for all the good content! defo subbed

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

    Love this. Especially that it explains constructors better than my classroom teacher. Now, that makes the toString method but how do we make a println toString in main if we had this all on one class. Thank you again!

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

    Thank you so much! I finally understood why/what 'toString' is.

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

    Thank you so much for this tutorial!! The way you broke it down was amazing! I totally understand it now!

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

    Can you make a tutorial about annotations or enums?

    • @circuit10
      @circuit10 4 ปีที่แล้ว

      I think he already did one for enums

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

    Thank you! Your teaching style makes it much easier to learn not so easy matters!

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

    You are a great instructor. I hope your new adventure is spectacular!

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

    Thank you for making another helpful vid! Keep up the good work :-)
    Your series is really useful for learning Java coming from python.
    This is basically the same as the __str__(): method in python.

  • @pragyasingh5880
    @pragyasingh5880 4 ปีที่แล้ว

    your way of teaching is really unique

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

    This helped me a lot
    Thanks, because of this I could complete my Car Dealership Project.

  • @theblindprogrammer
    @theblindprogrammer 4 ปีที่แล้ว

    Thank you, Alex! This cleared up the confusion I had with this method. It is kind of useful when you want to print something especially a class. Thanks.

    • @Tony.Nguyen137
      @Tony.Nguyen137 3 ปีที่แล้ว

      But why can you return a int studentId in a String method??

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

    this guy is saving my grade i swear

  • @dariahiguchi5890
    @dariahiguchi5890 4 ปีที่แล้ว

    Thank you so much for your hard work on making these videos, you are making complicated stuff easy and available, making the internet a better place:)) education industry (especially in CS) is lacking people like you XD

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

    Not sure if you've covered this in a different video, but have you gone over how to use java api methods like localDate? Love the videos

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

    Alex: Coding is Fun!
    Me: Just for the Teacher

  • @carl-henriklien3112
    @carl-henriklien3112 3 ปีที่แล้ว

    Nice and easy Alex

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

    Watching this video, I had the intention to learn one thing. I learned five things.

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

    thanks you helped me a lot

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

    very helpful, thank you a lot

  • @renecabuhan1675
    @renecabuhan1675 4 ปีที่แล้ว

    Good morning sensei.

  • @vikkybb881
    @vikkybb881 4 ปีที่แล้ว

    Awsome job done...please make more tutorials on java...

  • @rebergangster26
    @rebergangster26 4 ปีที่แล้ว

    good job bro and u are becoming the next bucky roberts

  • @youkeshgurung5280
    @youkeshgurung5280 4 ปีที่แล้ว

    You are a great teacher bro♥️♥️

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

    I love your videos!!

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

    can you do a video of how to use a scanner

  • @joethompson8147
    @joethompson8147 4 ปีที่แล้ว

    Great explanation Alex

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

    Thank you so much

  • @sartajsajid7941
    @sartajsajid7941 4 ปีที่แล้ว

    Thanks a lot!

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

    nice video on toString(). however, i have a question. what benefits does this have over a void method such as public void describe(){ System.out.println(student+ " "+name);} and a call to the method through s1.describe(); and s2.describe();. Could it be because of memory usage or time complexity 🤔. Just a newbie trying to learn java, TIA.

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

    Thank you! So helpful!! :D

  • @jossau
    @jossau 4 ปีที่แล้ว

    Alex could u please tell us what is the coolest, or more functional program you had made? I just want to see if what I could be capable of If I keep learning from your vids 🥳

    • @theblindprogrammer
      @theblindprogrammer 4 ปีที่แล้ว

      You can create an android app, using Java to scrape all the news headlines. It is easy, use the JSoup library to call URLs. It is really fun.
      You can also create an app that would alert you every time your favorite youtuber uploades a new video....

  • @huynhhuunhan6318
    @huynhhuunhan6318 4 ปีที่แล้ว

    hello alex, thanks you for this video.

  • @lianattily282
    @lianattily282 4 ปีที่แล้ว

    how do I override a toString method for a list or map? I wrote a class for a kind of List and I need to override the toString method? Do I use an iterator?

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

    THANKS!

  • @SeanCochran-o5u
    @SeanCochran-o5u 8 หลายเดือนก่อน

    Legend Legend…… what a legend

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

    Thanks 😊

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

    thanks mate

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

    thank you

  • @Naruto77695
    @Naruto77695 4 ปีที่แล้ว

    how align text in toString Method Please Any Hint....

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

    thanks

  • @jakekong8489
    @jakekong8489 4 ปีที่แล้ว

    Hello can you do a tutorial on payroll statement

  • @jerrykankelborg9943
    @jerrykankelborg9943 4 ปีที่แล้ว

    much appreciated

  • @gomgomsw9979
    @gomgomsw9979 4 ปีที่แล้ว

    lemme tell u about my story
    I want to learn psychology but my parent don't let me in
    so i randomly choose Computer Science
    I hate code so much it's really confusing with all the stuff
    now i'm in my 2nd semester and we learn about OOP
    i enjoying using Java right now thanks to you
    your new subscriber :)

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

    Annotations video plsssssssssssssssss

  • @YaiseAkuma
    @YaiseAkuma 4 ปีที่แล้ว

    Can we see a 'how to make a database and apply input' video... maybe use your gui for it because I have no idea how to implement a database where you create a new record when hitting a button.

    • @rainbow6siege345
      @rainbow6siege345 4 ปีที่แล้ว

      What does gui means

    • @YaiseAkuma
      @YaiseAkuma 4 ปีที่แล้ว

      @@rainbow6siege345 grqqphical user interface the things you see.

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

    one thing I didn't understand is why we used the toString method, was it because we had two Student objects?

  • @stevesteven-gw4zy
    @stevesteven-gw4zy 7 วันที่ผ่านมา

    Thanke you❤

  • @danielvr
    @danielvr 4 ปีที่แล้ว

    more GUIs plz

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

    Alex, have you made any games before except of tic tac toe?

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

    I never used this method, I think this time for do it

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

    you're amazing

  • @mortality3194
    @mortality3194 4 ปีที่แล้ว

    I love you vids, but could you use scanner inputs more often cause i really need help with those

    • @theblindprogrammer
      @theblindprogrammer 4 ปีที่แล้ว

      What kind programs you need help with?

    • @n.rv..n
      @n.rv..n 4 ปีที่แล้ว +1

      Scanner sc = new Scanner();
      int input = sc.nextInt();

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

    Does all print statement has toString () method deafault? (Anyone)

  • @hannahfatima4814
    @hannahfatima4814 4 ปีที่แล้ว

    Hi alex! Do you have a video tutorial of a java program that will input the user's infos and save to text file?

    • @theblindprogrammer
      @theblindprogrammer 4 ปีที่แล้ว

      What kind of info like first name, age and like that? It is easy.

    • @hannahfatima4814
      @hannahfatima4814 4 ปีที่แล้ว

      @@theblindprogrammer yes

  • @Miguel-kb9nk
    @Miguel-kb9nk 3 ปีที่แล้ว

    In min 3:22 what did you do to change ''sysout'' to ''System.out.println()''? I type pretty slow and this will be really helpful for me :D

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

      type Sysout then control+space. I think this only works in Eclipse tho

    • @Miguel-kb9nk
      @Miguel-kb9nk 3 ปีที่แล้ว

      @@straizobrando8334 Im using eclipse and It doesnt work for me :/

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

      @@Miguel-kb9nk that's weird... are you holding ctrl and then space? It works for me and i learned it from this channel

    • @Miguel-kb9nk
      @Miguel-kb9nk 3 ปีที่แล้ว

      @@straizobrando8334 Yes, and It sais something like "create a new method: sysout()"

    • @Miguel-kb9nk
      @Miguel-kb9nk 3 ปีที่แล้ว

      @@straizobrando8334 OK im so dumb I tried it in a random place just to check if it works, but it only works in the main method :s my bad

  • @kuyakambal2417
    @kuyakambal2417 4 ปีที่แล้ว

    What laptop do you use in coding?

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

    u are goated

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

    Why not explain the "why"?

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

    Learn together,uwuuuuu

  • @tiboomvds344
    @tiboomvds344 4 ปีที่แล้ว

    Pls make a game making turtorial serie 2d or 3d game

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

    I seem to get everything your videos go over but still have difficulty translating it in to what my teacher wants. He asks us to do everything in a different way than the book and everybody on the planet show how to do it

  • @asonga5410
    @asonga5410 4 ปีที่แล้ว

    Love your videos Alex, but please drop down your braces so they line up 😭. Drives me crazy whenever I see code with the braces not in line with each other.

  • @awesomepizza25
    @awesomepizza25 4 ปีที่แล้ว

    Hello :)

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

    ekster made in china hahah joke man!

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

    Keep up the good work Alex! Thank you so much for your videos!

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

      thanks! :)

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

      ​@@alexlorenlee bros on top of his class fasho💀

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

    The fact that I understood what the purpose of constructors were before the video ended says something about the hours and hours of lecture videos I saw of my professor. Thank you so much

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

      Exactly what I said. Alex should be teaching at university level.

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

    Love your channel!! Any chance you could make a video on Lambdas?

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

    Thank you so much for taking the time to pass along detailed overviews. I have taken several university-level programming classes and your delivery method surpasses that of my professors. I often feel frustrated by their teaching styles and my lack of long term retention with this subject matter. Your videos give me the confidence I need and help me to feel like I have actually learned something rather than just mimic methodologies from a book. I am interested in programming from a personal development standpoint and to build a better working relationship with many of my technology coworkers.
    Would it be possible to request a video on how to apply different operations to strings (.i.e, Random, Sorts, etc...)? I am struggling to find good information on how to apply these operations to custom classes.

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

    You have a talent to teach Alex.
    First place if I'm searching for simple explanation. Thank you 👍👊

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

    waiting for ur next chill sesh ☕

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

    This was an incredibly simple, yet incredibly valuable piece of information, Alex. Thank you!

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

    Alex, can you please make a tutorial on ArrayList and LinkedList?

    • @theblindprogrammer
      @theblindprogrammer 4 ปีที่แล้ว

      Do you need a specific implementation of it, or you have specific program in mind?

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

    Ohhh, this looked a lot harder than it actually is! Thank you for explaining it so clearly :D

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

    Thanks the vídeo was so helpfull, but i have a question, what i need to do if i only want to print one variable with the text of the tostring and in the same time can print more variables?

  • @TacerTV
    @TacerTV 4 ปีที่แล้ว

    Can you please make a video on how to create ActionListeners for buttons because I have problems

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

    Beautiful man absolutely loved it From India 🇮🇳

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

    I love your videos!
    One thing: I could swear I typed everything into Eclipse just as you did, but after compiling it returned "0 Bruce" and "0 Jackie" .... Why is that??
    In my constructor, inside the public class STudent, when I wrote "this.name = name", I can literally see that the name refers to the one inside the brackets of the constructor (because of the color); but in "this.studentID = studentID", the studentID doesn't.... (I write ID instead of Id, but I did everywhere).

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

    Okay.... I take everything back.... I wrote a captial "s", where it should have been a small one XD XD
    Now it works.

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

    Can you make a video about underrated methods/Keywords that every programmer should know?

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

    Thank You!!!!

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

    Sound of keyboard is so satisfying.

  • @erikrl2
    @erikrl2 4 ปีที่แล้ว

    Why does the toString() Method have to be public? Even when it's in the same java file with the object using the method.

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

    did anyone ever tell you that you have a great voice becuse you do
    also thanks for saving my grades

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

    Thankyou
    Form making it easy to understand

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

    Thank you for the great explanation!

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

    Thank you for all these videos! you are the MAN!

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

    I hope I can remember this method in my APCSA exam

  • @Tony.Nguyen137
    @Tony.Nguyen137 3 ปีที่แล้ว

    toString is a String method which can return a int stundentId?!?

  • @tewodrostilahun3801
    @tewodrostilahun3801 4 ปีที่แล้ว

    Alex You are fantastic .It is helpful lesson . you are Iron Man

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

    i have a question. Why you didn't pass toString () in println ()