Main Method In Java Tutorial #57

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

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

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

    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

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

    I'm the type of person that really likes to take things apart, get to the bottom of them to find out how they fundamentally work, and that's the only way I feel like I can truly learn something. When something's presented to me as "That's just the way it is, don't worry about it", my brain struggles to ignore what's not explained. Thank you so much for taking the time to break down and explain things that none of my professors bothered to.

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

      ME TOO!!!! I struggled SO much in school because I wanted to truly understand things, not just remember or accept things cuz someone said so

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

      bruhhh sammeee

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

      It's so funny too because whenenever you go to their office and ask them to explain it one more time. They tell you that you shoud've pay attenton in class more.

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

      Me too! It has cause me a lot of problems in my life bc that’s the way I am. I believe that it has turned me into a really slow learner which can be frustrating.

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

      I’m the same.

  • @-Bloomingtales
    @-Bloomingtales 2 ปีที่แล้ว +24

    Thank you for using layman’s terms. My computer science class is so confusing because everyone is speaking jibberish because I don’t know the technical verbiage yet. When I get tutoring they’re talking the same way and it’s so annoying. This video makes the content relatable and within reach. Thank you!

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

      I still don't understand a lot of the jibberish :)

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

    This was really helpful! I had no idea I could pass arguments in right there on the command line

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

      Ivan James right??

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

      Hi, @@alexlorenlee I learn a lot from you. Can I suggest to make a tutorial on how to use static and non static methods in java

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html java❤️😎👍

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

    I love your channel! I’m a BIT major and I was so confused with using Java. You are really helping me understand it better. Thank you!!

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

    I have spent 4 years in college none of my professors techies the way you techie you are amazing thank you bro

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

    I just started and it confused me a lot, but with this I think I understand the basics.
    I heard it's torture to learn Java as your first language but I already started so I'm going with it.
    Thanks a ton.

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

    Hey Alex, I just wanted to let you know I have been watching your tutorials for the last couples of days as I have been struggling with my COMP java course. I have my exam next week and your tutorials are making me feel more comfortable with my knowledge and my ability to pass my exam next week. I will let you know how I go ! :) But thank you very much for putting these tutorials out there, you make it very easy to understand.

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

      How did the exam went?

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

    Legit have been binge watching all your vids because I dont understand a bunch of stuff and I need to work on a project lmfao.

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

    still confusing for a beginner but i have a better understanding of what these things do. thanks so much.

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

    public just means that anyone can access this method/class/variable, even if its in a different package.

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

    I learned more from this than ans teacher ever could in this time lol

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

      It takes a very disciplined and patient teacher to teach you properly ,in a way you can understand. So , I respect teachers that are like that.
      Unfortunately ,not all teachers are professionals, besides they teach you in exchange for money, which in time can "corrupt" them.
      Alex's idea is great ,he is teaching us ,because he likes it. There are no conditions , the goal is simple :
      Make rather difficult to learn language appear easy to learn.
      When I first started learning the basics ..... I got scared off , like ,literally nothing understood. I thought , this can't be so freakin' difficult ,
      THERE MUST BE A SIMPLER WAY TO EXPLAIN THIS !
      So , Thank you Alex.

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html java❤️😎👍

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

    Thank You! I learned a lot from you

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html java pro lang❤️

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

    It all makes sense now - so this is basically how something like a bash command handles arguments I suppose. Thanks, damn don't stop making videos like these

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

    Just to be sure how good are your contents, not a single dislike. **Respects**

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

      I am learning programming without a teacher in real life and I don't study it in school.

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

    First of all Thank you so much to explain easy, and Could you please write small project and explain step by step. Thank you!

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

    Youre tuturials are helping me a lot with programming at my university! Thank you a lot!!

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    Really awesome and loved ur tutorial lot, it's really helpful, best core Java tutorial i have ever seen with practical 🙏, no word's to say...👍

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

    bro why you do me like that... i was used to your old layout :D
    thanks for all the content and hell Alex :-) i really appreciate everything :-)

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    Hey Alex, truly appreciate you man for simplifying these topics. Could you make a video with an example of an if statement inside a loop? 😁

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

    Thank you Alex hope you come back to Java again 😀😢

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

    sweetest programmer...thanks big guy

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

    This was extremely helpful -- thank you!! :)

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

    Hey, Alex! That was an awesome video. I was having trouble in understanding the purpose of this argument used in main function and finally, I got clarified after watching this video on my third year of college XD Almost all of your videos promises to show something new and that's what makes me keeping watching them. Thanks again!

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    Perfectly explained! Thankyou so much

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

    Quick shortcut for getting System.out.println is to put sysout and then do ctrl + space and it auto completes it.

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

    Thank you Alex! Your videos are saving my Java programming course grades! I wish my instructors would simplify these concepts the way you do. I also appreciate the older videos showing the shortcuts you use. Thanks for taking the time to do these videos!

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

    Thank you! This was very useful.

  • @HouDa-fi9nq
    @HouDa-fi9nq 4 ปีที่แล้ว

    Thank you Alex , it was very useful and i really enjoyed this playlist , keep going !

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    Can you do a tutorial on Lambda expressions and Streams?

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

    JDK 14 coming out on March 17

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

    best explanations ever; thank you

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

    Great one !

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

    Thanks Alex :)
    You answered my question later in the video :)

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

    Great videos, totally what is required. Thank you so much

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

    Thanks! Bro.

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

    Hi Alex! Thank you for your videos on Java; they're very helpful. When you said, ""if you make a 'main' object from this class and then add a dot, then 'this' method would pop up." Is there an example of that in your playlist of videos?

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

    Thank you so much bro

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

    Hi Alex thank you for your amazing tutorial , can you do a tutorial about difference between Scanner and Bufferreader ?

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

      look up "scanner and bufferreader difference" I'm not sure how to explain

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

    hey Alex This was very helpful i explore different Codes that i don't know. :)

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    java networking.. client server program next?

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

    hello i doubt you'll respond to a comment in a 3 yr old video you made but i still don't understand the "why" of the String array parameter in main. Why exactly is it need to run system.out.print("Hello"): if we aren't specifically using it.
    my best guess is because main is well the main method of a program while to can set the arguments for other methods you can't set arguments for main inside of main but only in the terminal and the reason why the string array is needed in main is java is looking for it like how it will look for main
    sorry i'm absolutely new to programming

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

    Alex Lee is the goat

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

    I like ya cut G!

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

    Thank You Tons!!!!! I needed this lots of love xD

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

    really nice thanks!

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

    Align this properly in playlist

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

    I'm a lil confused why these videos skipped from October 2018 to March 2020

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

    Hi. Can you give me an example of why you would need to print out or see the arguments?

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

    Hey Alex, thanks for making the videos small duration and on point topic. It's really easy to understand. Can I also request you kindly make a video on how to understand the exiting code for a beginner
    Basically, I am a beginner and learning Java from your videos. At the same time, I am having little difficulties to understand the flow of the existing code (I use eclipse).
    Hope, you understand what am I looking for.

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

      e.g, I have code like this:
      public class BuildmyQuery {
      public static final BuildmyQuery newQuery() {
      return new BuildmyQuery();
      }
      public static final BuildmyQuery newQuery(Class

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

    9:10 to 9:20 most useful in video!

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

    thankyou kind sir

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

    This helps so much dude. I hope you make a billion dollars from this channel lol

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

    THANK YOU

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

    Thanks man

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

    What is a practical application of these args? Is it necessary for example when creating an App? Or a videogame?

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

    Legend tutor!

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

    Is (String [ ] args) optional to use? Is it just there by default for you to use if you need it?

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

      venxten well you need the (String[] args), otherwise it is not the java main method and you can't run code from it. Only thing you can do is using (String... args) instead if you like.

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

    Thanks for the video! It's been great help but as beginners I have no idea how command line works , should I learn it before I continue learning Java? Or will I learn both as I go?

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

    syso(ctrl+space) will save you from typing in the whole System.out.println();

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

    I just don't understand one thing
    after he copied the entire code where did he paste it what was that window and how do I get it

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

    make a menu using JOptionPane please

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

    Thank you this is really helpfull. Can u add the source code like in your older videos?

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

    Hey Alex! Which music was playing at the beginning of the video? Nice explanation thou!

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

    I had a 20 minutes ad before this video😂 LOL

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

  • @elemental-server
    @elemental-server 4 ปีที่แล้ว +3

    Hey

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

      Elemental Server hey :)

  • @f.g.7257
    @f.g.7257 4 ปีที่แล้ว

    So if I understood correctly, methods are the Java equivalent of Python functions?

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

    java version ?

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

    Do a video to the stream class and how to use...

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    bruh wow i had no idea that you can make method in static

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

    so args is only used to confuse beginners? got it

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

    🔥🔥🔥

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

    Hi , Alex , I know this is not related to the video , but are you half Chinese ?

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

    I noticed the CRZ folder. You drive a CRZ?

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

    alex do you teach or do selenium or automation?

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

    Could you make a video on javafx, more specifically how do I get my eclipse to be compatible with JavaFX it doesn’t seem to be working for me how do I download javafx

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

      you need to use intelij idea with javafx.

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

    I have a small question.how do we print more than one element from args on the same line ?
    i did this but could not figure out how to separate the two elements
    System.out.print(args[0]);
    System.out.println(args[1]);

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

      Your question is from a while ago now, but maybe u are still wondering.
      A simple solution is System.out.println(args[0] + " " +args[1]);
      The issue is, if you dont have arguments passed in or an array of a smaller length, you get an error. So the best solution would be:
      for(int i = 0; i < args.length; i++){
      System.out.print(args[i] + " ");
      }
      another way to write it:
      for(String s : args){
      System.out.print(s + " ");
      }

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

      @@nickeastmusic9930 hey man, thank you for your response

  • @Michael-AC
    @Michael-AC 3 ปีที่แล้ว

    Why the heck did I never learn this in school?

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

    I'm having trouble with a program regarding nested loops, do you think you'd be able to help me out?

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

      Post your code. Im not a pro but Maybe i will be able to help

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

      Would Discord work? Otherwise I can give you an email.

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

      @@ariton2990 I'm sorry, what's discord?

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

      @@AFamilyTings its a program where you can talk with each other either via text or via voice. Like Skype if you ever heard of it but much better.
      discordapp.com/

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

      @@ariton2990 Will an email work?

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

    Nice video!
    It would be cool if you would give us a little insight into how programmers ACTUALLY use this feature :)

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

    Can you start teaching some Linux commands to (continue with the java tutorial but add a Linux one it doesn't have to be once a week just try to so it plsssss)

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

    Damn, Java IDEs look so much prettier on OSX.

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

      try IntelliJ. It looks really nice.

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

      @@ariton2990 is this text editor intellij

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

    alex, do you recommend Mac?

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

      th-cam.com/video/UcMbREn1RRA/w-d-xo.html

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

    hey
    Admin :)

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

    No you don't have arrow key in your keyboard :D

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

    JOptionPane video please

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

    Wish you had a dark theme 🙄

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

    Every thing is good but u speak very fast and can't understand

  • @michaels.9206
    @michaels.9206 4 ปีที่แล้ว

    javafx game menu tutorial for beginners can you help me

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

      Come th-cam.com/video/UcMbREn1RRA/w-d-xo.html❤️😎👍

  • @musakhokhar._2624
    @musakhokhar._2624 3 ปีที่แล้ว

    Sorry but other than the rest of your videos i did not understand anything.
    I am confused. ???

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

    :)

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

    Third

  • @АндрейСидоров-ц3ж
    @АндрейСидоров-ц3ж 4 ปีที่แล้ว

    I think, you are sleepy)))

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

    I couldn't bring myself to press like... there are already pi likes. I think that's enough

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

    I still don't get how that's useful. In which case would you use it? Why does the main method have those parameters as default? And also, even though using the command line looks cool af and feels like you are hacking NASA, why would you want to execute your program there? I'm just getting started but those questions keep on comming at me and I'm very curious about it. I'm sorry if these are too many questions in one single comment. Thanks on advance!

    • @lorcanzo2498
      @lorcanzo2498 3 วันที่ผ่านมา

      Any answers?

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

    Alex, I have doubt. If we use scanners to take input from the user. Are this input should store in args[ ] string array.

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

      you can store them in any variable. Scanner’s job is to scan the input and then store it into the data type variable you mentioned

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

    you could have done anything in the world, but you did this instead!!!
    i love the way you explain it, checking what happens, if you do this or that, trying different ways and approaches, this is exactly my style to understand stuff!
    i will binge watch the rest of it :)

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

    Your videos are so incredibly helpful. Can you please make a video about polymorphism? I'm having a bit of trouble understanding it in my current class and you break things down so well. Hopefully you see this! THANKS!

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

    Hey Alex i love your all videos you teaching so great. So please help me to understand fix my mistakes that always happen in my coding that is error init it says main method not found please define main method... it is really annoying me.

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

    i have no idea why, but i think that Alex Lee is the kid in "14 year old prodigy programer dreams in code".