Java methods 📞

Поделиться
HTML-код
  • Опубликовано: 18 окт 2020
  • Java methods tutorial explained
    #java #methods #tutorial
    public class Main {
    public static void main(String[] args) {
    // method = a block of code that is executed whenever it is called upon
    int x = 3;
    int y = 4;
    int z = add(x,y);
    System.out.println(z);
    }
    static int add(int x, int y) {
    int z = x + y;
    return z;
    }
    }
  • НаукаНаука

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

  • @BroCodez
    @BroCodez  3 года назад +54

    public class Main {
    public static void main(String[] args) {

    // method = a block of code that is executed whenever it is called upon

    int x = 3;
    int y = 4;

    int z = add(x,y);
    System.out.println(z);
    }

    static int add(int x, int y) {

    int z = x + y;
    return z;

    }

    }

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

      booba

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

      thanks mate!

    • @mst736
      @mst736 7 месяцев назад

      public class Main{

      // method = a block of code that is executed whenever it is called upon

      public static void main(String[] args) {

      String name = "Bro";
      int age = 21;

      hello(name,age);

      }

      //void method

      static void hello(String name, int age) {

      System.out.println("Hello "+name);
      System.out.println("You are "+age+" old.");
      }




      } Here you have the void method example master Bro provided. Best Regards.

  • @stickydamper
    @stickydamper 3 года назад +109

    More people should know about this series. By far the best I have seen on you tube.

    • @FelipeDiaz-tt3zj
      @FelipeDiaz-tt3zj 3 года назад

      I need help, how should I use this tutorial.
      Should I look at the video and then copy it into the java, or at the same time as the video to do it?

    • @stickydamper
      @stickydamper 3 года назад +5

      @@FelipeDiaz-tt3zj Every person has a different method. What I do is to watch and type the code side by side. I pause it in the middle, write code and may be play with it and see what else can be done with that. I never copy the code, that works for me. Generally when I am learning a new language, I already start with a project in my mind and then watch the tutorials for straight many hours, get the syntax and start working on the project. Then I keep coming back when I need to.

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

      +1

  • @raspberrybabe27
    @raspberrybabe27 10 месяцев назад +9

    these videos are saving my butt. I've been so lost in my coding class and you explain these concepts so simply but clearly. Thank you!

  • @mohamadnazirissumalgy3699
    @mohamadnazirissumalgy3699 3 года назад +9

    Bro, you're the best.
    Your job is priceless!

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

    I can count on you to get me thru the boot camp I'm currently in. Appreciate you bro!

  • @pavelkvasnicka6856
    @pavelkvasnicka6856 Год назад +5

    This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro

  • @shyam.upadhyay
    @shyam.upadhyay 2 года назад +12

    "It doesn't matter what you do."
    -- Bro

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

    Sir You are a great teacher i swear the way u explains things are just mind blowing thank u for such type of playlist

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

    amazing personality, love your channel!

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

    You are so incredibly good at explaining. I wish you were my Tutor. I learned so much from your channel already. Im so grareful i found you. You are truly the best

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

    You're actually really helpful thank you :)

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

    Super useful for beginners like me. Thanks Bro! Happy 2022

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

    Good content a usual. Keep up the good work!

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

    Random comment to appreciate this wonderful video, God Bless you man

  • @TheMurdok77
    @TheMurdok77 4 месяца назад

    I watch your videos religiously, they're the best on RUclips.

  • @12bradleyd
    @12bradleyd 2 года назад

    Super helpful videos! Thanks for making these

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

    Amazing, I don't know how to thank you for your wonderful method of teahing. This is what I wanted for my kid to learn Java, Easy and very Practical.
    Thank you very much!

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

    You are doing an amazing job Bro 😍

  •  2 месяца назад

    Bro code! Great concept! Thanks for the lessons, bro. 😎

  • @theximera13
    @theximera13 11 месяцев назад

    pretty comprehensive explanation, thanks!

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

    Thanks for explaining so well!

  • @shriyarastogi1-jv1mf
    @shriyarastogi1-jv1mf 13 дней назад

    Thanks bro! you're blessing for us...

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

    This helped me so much thank you!

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

    I loved the Z trick. They did not teach that in the bootcamp. It is very simple thanks

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

    Great teaching. thanks

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

    thx a lot for your job

  • @ligdjumvidja8294
    @ligdjumvidja8294 4 месяца назад

    Brilliant video thanks a lot !

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

    thanks Allah that i know your seriuse, you are a true legend bro!

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

    Now it is so simple. Thank you

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

    love your teaching

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

    You are very nice teacher! I will listen you in your next films ^^ Maybe I don't know english so perfect but I can understand you. It's very nice :D

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

    my fellow bro, you are awesome❤

  • @danny.3036
    @danny.3036 3 года назад

    Thanks, Bro! ☕ You're awesome!

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

    Methods understood completely, 2d ArrayList used as example. 22th. Thank you, ma Bro Sensei!

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

    Incredible !

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

    thanks a lot, Bro Code you are a hero!

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

    I already learnd so much thank you

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

    Bro you are breathtaking🙇‍♂

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

    Holy shit ! Take my hand Master :(( !!! I have 5 videos about this topic, but you have lightened my understanding

  • @rownakmallick2426
    @rownakmallick2426 4 месяца назад

    great video!!

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

    Thank you so much bro, amazing job

  • @dllm3tommy741
    @dllm3tommy741 9 месяцев назад

    Thanks for the video

  • @user-zq6yx7of5f
    @user-zq6yx7of5f Год назад

    Thank you very much

  • @fryingpanm6977
    @fryingpanm6977 2 месяца назад

    i am saving this channel. so i am a hero

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

    Very nice bro 😊❤

  • @Kd12334
    @Kd12334 2 месяца назад

    I was trying to understand this for 2 hours today from various sources, but it seems i just needed this video🎉

  • @user-wb7zv4fr4z
    @user-wb7zv4fr4z Год назад

    thank you for this course.

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

    great job

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

    So helpful!

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

    thx 4 vid bro !

  • @dawidmateuszbudkiewicz4938
    @dawidmateuszbudkiewicz4938 23 дня назад

    This is like the 10th time brocode helped me and i'm just getting started!

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

    master of the universe!

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

    Ayyyy, nice!

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

    Cool!👍 Hope you already got static explain))

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

    thanks bro . i watched the add to the end i hope it helps:)

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

    Thanks, bro!

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

    identico ao conceito de "codar modularizado em python", that's cool!

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

    Great ♥️

  • @yousefsammar176
    @yousefsammar176 3 месяца назад

    I have an exam in 12 hours and these videos will save me
    Thx bro

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

    Realy outstanding

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

    More detailed code of the provided lesson:
    *********************************************
    public class Main {
    // method = a block of code that is executed whenever it is called upon
    // Since we are calling the add(int, int) function inside the main() method which is a STATIC method, therefore, we also need to make the add() method STATIC.
    static int add(int x, int y) {

    int z = x + y;
    return z;
    }
    // In the above function definition, (int x, int y) are called parameters.

    // Since we are calling the hello(String, int) function inside the main() method which is a STATIC method, therefore, we also need to make the hello(String, int) method STATIC.
    static void hello(String name, int age) {
    System.out.println("Hello "+name);
    System.out.println("Your age is "+age);
    }
    // In the above function definition, (String name, int age) are called parameters.

    // Driver Code:
    public static void main(String[] args) {

    int x = 3;
    int y = 4;

    // Calling method add(int , int)
    int z = add(x,y);
    // In add(x,y), x & y are called arguments.
    // z = 7
    System.out.println(z);

    // Calling method hello(String, int)
    hello("Pritam", 25);
    // Hello Pritam
    // Your age is 25.
    // In hello("Pritam", 25), "Pritam" & 25 are called an arguments.
    }
    }
    // Important Difference Between Argument and String.
    //*************************************************
    // The values that are declared within a function when the function is called are known as an argument. Whereas, the variables that are defined when the function is declared are known as a parameter.

    • @DrEggCake
      @DrEggCake 7 месяцев назад

      thanks i needed this im watching this same video for the 6th time because i forget what method arguments and parameters every time

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

    Thank you 😇

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

    Thanks Bro

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

    Thx bro you are our sun tzu 🙏

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

    Thank you bro :)

  • @eugenezuev7349
    @eugenezuev7349 3 месяца назад

    thank you, Bro

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

    Bro, your are my bro!

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

    We’re hoping bro that you can upload a tutorial that java connects to DB :) thankyou

  • @cherry6280
    @cherry6280 11 месяцев назад

    thankyou bro👌👌

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

    thanks bro

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

    Thank you bro!

  • @praveenbalajikalla-ng6mx
    @praveenbalajikalla-ng6mx 4 месяца назад

    niceee bro

  • @biswajeet9826
    @biswajeet9826 Месяц назад

    Thanks Bruh!!❤😊

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

    Bro super

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

    Love it

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

    thank you

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

    very cool 😎

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

    THANK!

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

    Cool :)

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

    Thanks!!

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 года назад

    Thanks

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

    Thank you

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

    Οι μέθοδοι σε κάθε γλώσσα αντικειμενοστρεφούς προγραμματισμού, είναι πολύτιμες!

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

    nice vid

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

    Nice.

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

    thanks!!

  • @abhijaiallgamesgamer2075
    @abhijaiallgamesgamer2075 2 месяца назад +2

    I AM YOUR SAVIOUR (i commented and saved you)

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

    Super

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

    thanks

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

    Nice

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

    I just use textEdit and the terminal to write all my code, I haven't needed to use static on methods I don't want to be static. Do you have an explination?

  • @medjl6083
    @medjl6083 3 года назад +3

    The method in programming, allows you to reuse the code.

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

    thank you.

  • @tonytonychopper4525
    @tonytonychopper4525 10 месяцев назад

    nice

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

    Good sir

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

    good

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

    is there any difference between functions and methods in java, pls?

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

    "Wow, this coding video is absolutely fantastic! I've been following this channel for a while now, and I must say, you have been a tremendous help in clearing my doubts and enhancing my coding skills. I even watched your Python tutorial videos, which made a world of difference for me. The explanations are clear, concise, and far more engaging than what I've experienced in my university courses. Thank you so much for providing such valuable resources and making coding accessible and enjoyable for learners like me. Keep up the excellent work!"

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

    big bro

  • @carlosromo6054
    @carlosromo6054 Месяц назад

    done (the hero stuff)