Return Statement in Java #27

Поделиться
HTML-код
  • Опубликовано: 5 авг 2024
  • $1,000 OFF ANY Springboard Tech Bootcamps with my code ALEXLEE. See if you qualify for the JOB GUARANTEE! 👉 bit.ly/3HX970h
    The return statement in java helps you send a value from the result of your method!
    👑Start practicing now with 10 free java programs - alexlorenlee.com/
    🌅 Source Code - github.com/alexlorenlee/JavaT...
    Here's an example of a return statement in java:
    public static int add(int a, int b) {
    return a + b;
    }
    "int" on the first line is the type of what is returned. "a + b" is what's returned when the method is called. Like add(5, 4);
    re
    This java return statement in java can be tricky at first... But SURELY you'll get it :) If you followed along, congrats! You learned-by-doing!
    I hope you enjoyed this tutorial on the return statement in java! I like to have a nice mix of tutorials and actual projects for you all :)
    Do you want to learn how to write java code from scratch, in Java? Check out my Java Tutorial For Beginners: • Coding For Beginners I...
    Was this able to help you write return statements in your methods? -
    Full Java Tutorial For Beginners Playlist: • Full Java Course by Al...
    Free Tips: bit.ly/3U6HXcb
    Disclosure: The Springboard link provided is linked to my affiliate account & supports the channel.
    ~
    Alex Lee

Комментарии • 335

  • @alexlorenlee
    @alexlorenlee  9 месяцев назад +4

    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

    • @SwiperANASS
      @SwiperANASS 6 месяцев назад

      drive.google.com/file/d/1szuFv-DhcuKlzK61wwl-bE5VwHdMKEoB/view?usp=sharing

  • @whed.8699
    @whed.8699 3 года назад +219

    came here to understand the return statement, ended up also understanding arrays. seriously... thank you king..

    • @youare4347
      @youare4347 3 года назад +2

      Me too!

    • @spiceydice6968
      @spiceydice6968 3 года назад +1

      e

    • @eliyahukuperman9250
      @eliyahukuperman9250 2 года назад +9

      I already did understand arrays. But return was really unclear to me, I was asking myself questions like "Return the value to where?"

    • @xyz-e7s
      @xyz-e7s 2 года назад

      Same here

    • @eliadaballazhi2982
      @eliadaballazhi2982 2 года назад

      @@eliyahukuperman9250 😂😂😂sameeeeee

  • @oggyoggy7131
    @oggyoggy7131 5 лет назад +338

    Dude I am not gonna lie but i learned about methods and return statements from many java courses online and was still confused about it .But your explanation helped me the most in understanding the concept clearly. I hope you get more subscribers and please keep posting more videos. :D

  • @dylanchan3772
    @dylanchan3772 4 года назад +43

    Seriously, why can't all teachers just make it this simple? Thanks Alex!

  • @katiejones7049
    @katiejones7049 4 года назад +78

    I've been working on an assignment that asked me to return a new string that was in the middle of some characters () for 7 hours. I FINALLY got it to work with 2 methods and the return statement. You're an awesome teacher! Thank you from the bottom of my exhausted student heart.

  • @maazking9087
    @maazking9087 5 лет назад +47

    this return thing was totally messing my mind up...thank god you are here man

  • @rmkkmrrmk
    @rmkkmrrmk 4 года назад +11

    Dude. Your videos are so important, because you don't focus on complex code, you focus on simple code that allow us to think in a bigger and more complex code once we fully understand the basics. Thank you so much for that.

  • @ilhammammadli4560
    @ilhammammadli4560 2 года назад +8

    Alexç your teaching method is totally out of the league. Just wonderful. I believe whatever you do, or you teach, your listeners will get the whole idea! Luck!

  • @HopefulRaccoon
    @HopefulRaccoon 2 года назад +2

    I've been so confused about return statements and I've tried multiple videos, asking my professor, and reading the book with no luck. Your video helped it finally click. thanks!

  • @nour2eldin137
    @nour2eldin137 11 месяцев назад +1

    Dude this chan is a masterpiece fr, for me who learned c sharp first but then changed to java your chanel was the real help for me ( i didn't even bother talking a course about Java due to semilarity between java and C# ) but found out that it's harder than I thought and then I put my hand on your 14 min course and then here am I finishing your chanel, hope ya keep going and get much higher subscribers num, thanks for everything

  • @nx8221
    @nx8221 5 лет назад +16

    Bro, I was struggling with this for ages! Thanks, I'm gonna check out your other videos now!

  • @Sheudful
    @Sheudful 4 года назад +2

    Just started an online java course, and your videos are by far the best i have found. You deserve more, thank you and good luck with the channel!

  • @milenap6603
    @milenap6603 Год назад +2

    WOOOOOOOOW! This is the first time that I'm leaving a comment on youtube, but now I had to, just to say one big BRAVOOOOO for you, Alex! I lost so many hours trying to figure out methods and return statements from other online courses , but you perfectly explained it in just 14 minutes!!! Thaaaank youuu soooo muuuuch and you just have earned one more subscriber :D Best regards from enlightened viewer :)

  • @rohanpitla3745
    @rohanpitla3745 3 года назад +1

    Omg thank you so much, I was having such a hard time with these methods and stuff but you made it look so easy.
    You are a savior man !!!

  • @kalenschack1587
    @kalenschack1587 4 года назад

    Thank you so much for all of your videos. I'm taking a college-level Java course (solely as a requirement) and I have learned the entire coursework from your tutorials. You even made it kinda fun! I hope you make a million dollars.

  • @mikkoronnberg5193
    @mikkoronnberg5193 4 года назад +3

    Alex, you just earned new sub from me! I mean jesus our java course is explained so confusing way but every time I need help I just found that thing explained by you and voila! You sir, are the best java teacher in this planet for sure! Keep up the good work,
    greetings from Finland

  • @krishna-tj9ut
    @krishna-tj9ut Год назад

    you made it really simple ,you might be the sweetest programmer on this platform

  • @pollyisnochicke20
    @pollyisnochicke20 2 года назад +3

    Very useful! I didn' t get this subject, and you explained it perfectly! This is what i call quality, earned a sub!

  • @victoriadealba6675
    @victoriadealba6675 3 года назад

    I'm a begginer at coding and your videos are so easy to understand! I STAN YOU, you got yourself another subscriber

  • @shawnshaw3658
    @shawnshaw3658 4 года назад +1

    Hey Alex, thank you so much for helping me get through my Java 1 class, these videos are great!

  • @pavanmanny4523
    @pavanmanny4523 Год назад +1

    Hi Alex...the best thing in your video is "when you are typing the keyboard that sound makes us feel like... yeah we can do it...we can learn code easily. Thank you for making such simple and informative videos.

  • @So.yo11179
    @So.yo11179 Год назад

    Thank you so much Alex for your videos! They helped me understand a lot of concepts I couldn't from my course.

  • @jorgecuellar3985
    @jorgecuellar3985 4 года назад

    you do a really good job explaining, putting all in simple words. love your channel keep it up.

  • @elleZephiroth2
    @elleZephiroth2 5 лет назад +5

    Finally, return statement explained properly! Thank you!

  • @samirallahverdi4948
    @samirallahverdi4948 4 года назад +1

    You are the only teacher who taught me why methods is useful in java..thank you

  • @kalitaylor4799
    @kalitaylor4799 3 года назад

    I was struggling to understand return statements so I could complete my lab tomorrow for my beginner CS course. The zybook wasn't cutting it...but then I found your video. Thank you so much!

  • @juanito9835
    @juanito9835 3 года назад

    Thank you so much, i was not understanding what the reason of the return statement at all but you just clarified it to a tee

  • @pca9172
    @pca9172 3 года назад

    I was having trouble understanding this part earlier but you helped me out with this video.Thank you so much man!

  • @vikrantkambli9265
    @vikrantkambli9265 2 года назад

    I just love the way you are teaching .thank you for this video

  • @chrizzly342
    @chrizzly342 Год назад

    Hey Alex, your explanation for the return statement was awesome!
    I just wanted to learn while having some food and thought I could use the few minutes.
    Totally worth it - simplicity and well explained examples. Keep on! :)

  • @evanj51
    @evanj51 3 года назад

    Alex your personality is amazing, and the videos help me understand everything so much better. Thank you.

  • @Kia780
    @Kia780 3 года назад

    Good man, good teacher. honestly your explanation was quick, simple and veeeeery needed! Thank you

  • @troopah8535
    @troopah8535 4 года назад

    Hey bro I wanted to say thank you for making this video. For the longest this was giving me issues and this cleared a lot up.

  • @subin-micha
    @subin-micha 3 года назад

    the little details mahn, the walkthrough after you write up your code is amazing! Brofist!

  • @pielosimplice
    @pielosimplice 4 года назад

    This was so so helpful. You are a great teacher!

  • @melissafoster2975
    @melissafoster2975 4 года назад +7

    Great videos! Seriously, these have been a life saver, and have helped me tremendously in my Java class to better understand everything. The textbook was not enough for me, but the videos with detailed explanations make all the difference.

  • @limonkhan2010
    @limonkhan2010 2 года назад

    you do everything very simple and easy way, thank you so much bro.

  • @bharatpaul5183
    @bharatpaul5183 3 года назад +1

    Great video and explanation, better than some bootcamp lecturer's. appreciate it

  • @fishionboy9911
    @fishionboy9911 2 года назад

    This is the first time that I understand return vs void methods. Thanks so much

  • @konadhanalakshmi8962
    @konadhanalakshmi8962 2 года назад +1

    Alex thank you very much to make return staments very easy to understand

  • @jerrys.lawson5418
    @jerrys.lawson5418 4 года назад

    FINALLY CLARITY TO RETURN STATEMENT!! NOW I CAN FOLLOW ALONG BETTER THANK YOU SO MUCH!!!

  • @bigsistershelpinghand1279
    @bigsistershelpinghand1279 5 месяцев назад

    Thank you so much Alex! This really helped!

  • @jonathanphillips5915
    @jonathanphillips5915 3 года назад

    Great explanation Alex! Thanks a bunch!

  • @xelo_516
    @xelo_516 3 года назад

    just all what i needed to know in one video,i love you bro

  • @ishivamgupta1
    @ishivamgupta1 3 года назад +1

    Broo ur great...ur teaching style is awesome

  • @kitchentable8529
    @kitchentable8529 5 лет назад +7

    Hey man. Another awesome vid!

  • @darksoulswookie1423
    @darksoulswookie1423 2 года назад

    Thank you so much man, I will never forget you

  • @Dudley3882
    @Dudley3882 4 года назад

    Return statement for me was one the most confusing to understand so far, this is only video that explains it proper. Kudos👍

  • @Cablur
    @Cablur 4 года назад

    This is so perfectly explained I really understand it now. Thank you so so much!

  • @haixintan8337
    @haixintan8337 2 года назад

    This is sooooooo helpful!!! Thank you so much!!!!

  • @chump6220
    @chump6220 2 года назад

    This is very useful coming from someone who slept through the return lectures

  • @mukulasija2729
    @mukulasija2729 3 года назад

    Great video facing too much problem in understanding return statement and this video cleared my doubt

  • @sparrowatseas807
    @sparrowatseas807 2 года назад

    06:40-06:42 is when everything became clear, thank you Lee!

  • @11.nguyenhongdien58
    @11.nguyenhongdien58 Год назад

    yoooo, this is so helpful, thank you so much!

  • @ARV1999
    @ARV1999 3 года назад +2

    Topre keyboard gang! I got a Leopold FC980C. Just love the 1800 layout for data entry. HHKB is also a great layout.

  • @abdiwahabadan1817
    @abdiwahabadan1817 4 года назад

    Alex your explanation is great sir it make a lot of sense to our logic

  • @nives1313
    @nives1313 3 года назад

    Literally this helped me to understand. Thanks❤. I appreciate it.

  • @gramoterolivemore6279
    @gramoterolivemore6279 Год назад

    I was accepted into an internship in June, for coding and web development, thru a non profit called "I C Stars," here in Chicago. They specifically work with people like me, from neighborhoods, like mine, and just wana say thanks for the learning! Trying to understand how to speak computer, and fluently, is confusing AS, but you break it down much more efficiently, compared to some other free teaching programs I'm attempting to learn from. Appreciate u. Liked/Subbed 🙏🙏

  • @ahsanhussain4470
    @ahsanhussain4470 4 года назад

    man i am watching you in 2020 and still you're better than my university's professor.........keep it up bro

  • @yt_bharat
    @yt_bharat 4 года назад

    The most relevant tutorial. Thanks n regards

  • @jhalakshrestha6189
    @jhalakshrestha6189 4 года назад +1

    That literally helped me a lot.

  • @agnibinasaha7047
    @agnibinasaha7047 4 года назад

    1 k subscribers in one day ! Your channel is growing very fast , Congratulations.

  • @cinemacat4108
    @cinemacat4108 3 года назад

    Thank you very much I ways felt confused about returning methods thank don't stop teaching us

  • @alancounter32
    @alancounter32 Год назад +1

    I just recently started to learn Java and my native language is Spanish and I could not understand this concept. This means that you are a great teacher!!! Thank you, now I can go to bed

  • @maelppmo
    @maelppmo 3 года назад

    THANK YOU SO MUCH PROFESSOR ALEX!!!

  • @accellex2845
    @accellex2845 2 года назад +1

    Still a bit confused, but that's a HUGE step from "Completely Lost" I was up till now. I was actually able to get a better idea of what the values mean. Compared to be before, "Why does it say public static void? Why does does the printed text have it's parts scattered all over through different names?"
    Now I would still be lost if I had to do it myself, but slowly I'd get it eventually. This was a great starting out point to lead me to the right direction. Months of frustration solved in less than 2 days.
    Thank you again.

  • @spongewent1479
    @spongewent1479 3 года назад

    thanks
    your java tutorials help me a lot

  • @simplifiedman
    @simplifiedman 4 года назад

    this guy deserves more than this!!

  • @ohgodimnervous
    @ohgodimnervous Год назад

    you are saving my life thank you so much. you are doing this worlda huge service.

  • @timjoyalle318
    @timjoyalle318 3 года назад

    This was helpful! Thanks!

  • @rachitasarkar2276
    @rachitasarkar2276 3 года назад

    Thank you so much for helping.

  • @strawberrybob7488
    @strawberrybob7488 4 года назад

    i have two words for you, alex lee.
    THANK. YOU.

  • @garyvarkey9546
    @garyvarkey9546 3 года назад

    Thanks man, you really helped me out. Love From India.

  • @manasdeshpande
    @manasdeshpande 4 года назад

    You are a better explainer!

  • @ianwashburn2012
    @ianwashburn2012 4 года назад

    Thank you sooooo much. So many people on the web want to be so obtuse.

  • @dennisgermishuys6126
    @dennisgermishuys6126 3 года назад

    Dude seriously. Thank you.

  • @augustoliver351
    @augustoliver351 5 лет назад +1

    Great video. Thank you.

  • @edberaga6357
    @edberaga6357 3 года назад

    Thanks for the lecture sir!

  • @jeankayembe5775
    @jeankayembe5775 3 года назад

    You are the best!! Thank you for this video :)

  • @massimolorenzi6640
    @massimolorenzi6640 4 года назад

    Simply great, you are the best

  • @showkathali3428
    @showkathali3428 2 года назад +1

    Bro simple and very good explaination ever😍👍

  • @jeetraval132
    @jeetraval132 4 года назад

    thanks bro nice teaching now understand return statements thanks alot!!!!

  • @isaacnyarko9134
    @isaacnyarko9134 3 года назад

    Bro, this tutorial was really cool and helpful

  • @shwetakestwal4292
    @shwetakestwal4292 4 года назад

    Your Explanation is... osm sir 😊

  • @joshuasamuel2265
    @joshuasamuel2265 3 года назад

    THANK YOU SO MUCH!!!!

  • @nixonx7
    @nixonx7 3 года назад

    Thank you so much for this

  • @yordanpetrov8345
    @yordanpetrov8345 4 года назад +1

    Wow i finally got it thanks !

  • @hdm464
    @hdm464 4 года назад +1

    Awesome Alex[ ] great teacher!! Drop a video on access modifiers\ thank you.

  • @deadpl55
    @deadpl55 3 года назад

    Awesome 🙌🏼

  • @jeanjulmis2347
    @jeanjulmis2347 Год назад

    Very well explained!

  • @devanshgoel1803
    @devanshgoel1803 3 года назад

    Thank you Alex lee
    This was a great help to me I have been thinking of return statement from many day
    Regards
    Devansh Goel

  • @Drdominguezc
    @Drdominguezc Год назад

    You are de best man.... Thank you!!!

  • @saharishtayeh220
    @saharishtayeh220 3 года назад

    its very amazing , thank u bro

  • @youare4347
    @youare4347 3 года назад

    Wow. Dude, this video is awesome!!!! 🙏 thank younnnn

  • @jeremiahbonguit9433
    @jeremiahbonguit9433 4 года назад

    you explained it better sir thank you

  • @person_-yz1uo
    @person_-yz1uo 2 года назад

    absolutely buying your java course when i have the money. you RULE.

  • @nicolegennaoui7482
    @nicolegennaoui7482 4 года назад +3

    Hello, do you think you could do a video that shows us the differences between return and void? Thank you!

  • @Jay16Mar
    @Jay16Mar 3 года назад

    best channel for understanding Java.

  • @paolobena
    @paolobena 3 года назад

    Great, thank you so much

  • @mananthakkar6493
    @mananthakkar6493 2 года назад +1

    DIFFICULT TO EASY IN JAVA = ALEX 😄
    BRO YOU ARE AWESOME!!!
    LOVE FROM INDIA!!!!