Java methods 📞

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

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

  • @BroCodez
    @BroCodez  4 года назад +70

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

      booba

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

      thanks mate!

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

      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 4 года назад +126

    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 года назад +6

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

      +1

  • @jojovstojo
    @jojovstojo 2 года назад +5

    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 10 месяцев назад

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

  • @yousefsammar176
    @yousefsammar176 7 месяцев назад +6

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

  • @mohamadnazirissumalgy3699
    @mohamadnazirissumalgy3699 4 года назад +16

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

  • @shyam.upadhyay
    @shyam.upadhyay 3 года назад +24

    "It doesn't matter what you do."
    -- 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

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

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

  • @raspberrybabe27
    @raspberrybabe27 Год назад +12

    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!

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

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

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

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

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

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

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

    You are doing an amazing job Bro 😍

  • @abhijaiallgamesgamer2075
    @abhijaiallgamesgamer2075 6 месяцев назад +3

    I AM YOUR SAVIOUR (i commented and saved you)

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

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

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

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

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

    amazing personality, love your channel!

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

    i am saving this channel. so i am a hero

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

    Realy outstanding

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

    love your teaching

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

    "Bro" Why are yo so good in explaining ?

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

    You're actually really helpful thank you :)

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

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

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

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

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

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

    I must say 3 years later and this video aged like fine wine

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

    Thanks for the video

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

    great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much

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

    Great teaching. thanks

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

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

    thx a lot for your job

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

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

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

    pretty comprehensive explanation, thanks!

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

    great job

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

    Good sir

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

    my fellow bro, you are awesome❤

  • @曾毓哲-b1t
    @曾毓哲-b1t Год назад

    Thank you very much

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

    Nice

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

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

    • @txfu-
      @txfu- 2 месяца назад +1

      ikr

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

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

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

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

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

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

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

    Now it is so simple. Thank you

  • @SodiqjonNomonjonov-y9n
    @SodiqjonNomonjonov-y9n Год назад

    thank you for this course.

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

    I already learnd so much thank you

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

    Very nice bro 😊❤

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

    great video!!

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

    nice

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

    good

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

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

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

    Brilliant video thanks a lot !

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

    Bro you are breathtaking🙇‍♂

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

    Super helpful videos! Thanks for making these

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

    Cool!👍 Hope you already got static explain))

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

    Super

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

    very cool 😎

  • @shriyarastogi1-jv1mf
    @shriyarastogi1-jv1mf 4 месяца назад

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

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

    Love it

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

    master of the universe!

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

    niceee bro

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

    Thanks

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

    thanks big bro

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

    Thanks for explaining so well!

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

    Nice.

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

    Incredible !

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

    nice vid

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

    This helped me so much thank you!

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

    Great ♥️

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

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

  • @viniciuslima1064
    @viniciuslima1064 27 дней назад

    Thanks, Bro

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

    Thank you

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

    Thank you so much bro, amazing job

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

    thanks a lot, Bro Code you are a hero!

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

    Please suggest projects in java to increase my hold in java

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

    Thanks Bro

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

    thanks

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

    Thx bro you are our sun tzu 🙏

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

    op

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

    Thanks, Bro! ☕ You're awesome!

  • @ArnavVerma-c3k
    @ArnavVerma-c3k Месяц назад +1

    I dont understand the use of return

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

    thanks bro

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

    thankyou bro👌👌

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

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

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

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

    thank you

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

    big bro

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

    Thank you !

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

    Thank you 😇

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

    So helpful!

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

    Gg

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

    I see that D&D, D&D Character Builder, and D&D Map Builder files.... It took me a few videos.... But I see it lol

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

    I still don't understand, you could have just done
    public static int add1(int x, int y) {
    System.out.println(x + y);
    return x + y;
    }
    and write less code? or is the meaning of the return keyword to actually store values in a new variable to use it for something else?

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

    Bro, your are my bro!

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

    will you ever teach spring ?

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

    thank you, Bro

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

    Bro super

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

    i like the part where he explains methods in java

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

    learnt