Main Method In Java Tutorial #57

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

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

  • @alexlorenlee
    @alexlorenlee  10 месяцев назад +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 года назад

      ruclips.net/video/UcMbREn1RRA/видео.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!!

  • @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.

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

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

  • @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.

  • @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 :)

  • @ariton2990
    @ariton2990 4 года назад +15

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

  • @klod5928
    @klod5928 4 года назад +9

    Thank You! I learned a lot from you

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

      ruclips.net/video/UcMbREn1RRA/видео.html java pro lang❤️

  • @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?

  • @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 года назад

      ruclips.net/video/UcMbREn1RRA/видео.html java❤️😎👍

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

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

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

    This guy is better than my university teacher, helps me to understand a lot of things, and who disliked his video is must be a teacher or jealous cause I don't see anything to dislike.

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

    finished the whole playlist, totally needs more of this !!!

  • @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

  • @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!

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

    im glad you are making videos. The other videos on youtube explaining java I just can not watch for some reason. keep it up please for us

  • @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? 😁

  • @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...👍

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

    Great one !

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

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

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    Another great video. Still mad at myself for putting them off for months since I thought I couldn't get the basics.

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

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

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

    sweetest programmer...thanks big guy

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

    Can you do a tutorial on Lambda expressions and Streams?

  • @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 года назад

      ruclips.net/video/UcMbREn1RRA/видео.html

  • @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.

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

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

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

    Thank you! This was very useful.

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

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

  • @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 года назад

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    Perfectly explained! Thankyou so much

  • @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?

  • @HouDa-fi9nq
    @HouDa-fi9nq 4 года назад

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

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    I like ya cut G!

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

    JDK 14 coming out on March 17

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

    Do you have a video explaining the difference between methods and constructors? Love your vids, Thank you so much!

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

    Thank you, very helpful.

  • @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

  • @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!

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

    I hope you do a video tutorial for data structures and algorithm. Thank you so much for this Sir Alex!

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

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

  • @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

  • @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 3 года назад

      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

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

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

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

    guys alex uploaded other video about methods i recommend you to watch the other video about methods and then watch this video because then you will have the complete view thx

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

    java networking.. client server program next?

  • @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!

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

    best explanations ever; thank you

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

    Thanks! Bro.

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

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

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

    Thank you!

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

    yooo alex your awesome!

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

    Thank you so much bro

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

    Alex Lee is the goat

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

    Please make a full java tutorial

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

    really nice thanks!

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

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

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    This video helped me learn so much, honestly I had no idea why we had to do everything inside the main method and how functions worked but now I do. Quick question though, how do you define it if you want to return something? Also, how can you use multiple parameters or use everything the user enters as one parameter?

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

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

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

    Legend tutor!

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

    thanks

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

    Your Java contend is still the very best 🥰

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

    Had a video suggestion... maybe you could explain what String[] args means in main method

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

    Thanks man

  • @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?

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

    thankyou kind sir

  • @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

  • @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".

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

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

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

    THANK YOU

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

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

  • @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.

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

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

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

    you gained a subscriber

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

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

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

    Align this properly in playlist

  • @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.

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

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

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

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

  • @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

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

    Hi @Alex and everyone , first of all thanks for the video!!! I tried something else in the main.
    But the output is not really what I was expecting:
    public static void main(String[] args) {
    //ask the user for how long args should be?
    Scanner userInput = new Scanner(System.in);
    System.out.println("Define Size:");
    int size = userInput.nextInt();
    args = new String[size];
    for(int i = 0; i < args.length;i++){
    System.out.println("add:");
    args[i] = userInput.nextLine();
    }
    }
    in the first iteration "add" is printed twice... would you know why? Please

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

    Why is the class name also the same as the main method? Does it have to be that way?

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

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

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

    make a menu using JOptionPane please

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

    Any suggestions for making a Java desktop app?
    Do you have any tutorials for desktop apps?

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

      ruclips.net/video/UcMbREn1RRA/видео.html

  • @f.g.7257
    @f.g.7257 4 года назад

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

  • @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!

  • @elemental-server
    @elemental-server 4 года назад +3

    Hey

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

    java version ?

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

    I had a 20 minutes ad before this video😂 LOL

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    alex do you teach or do selenium or automation?

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

    🔥🔥🔥

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

    I noticed the CRZ folder. You drive a CRZ?

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

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

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

    actually i hated the code but after watching your videos, now i am realizing what the hell i was doing by not doing code

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

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

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

      ruclips.net/video/UcMbREn1RRA/видео.html

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

    so args is only used to confuse beginners? got it