Java methods 📞

Sdílet
Vložit
  • čas přidán 18. 10. 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;
    }
    }
  • Věda a technologie

Komentáře • 161

  • @BroCodez
    @BroCodez  Před 3 lety +50

    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 Před 2 lety

      booba

    • @luchesegarlini
      @luchesegarlini Před rokem

      thanks mate!

    • @mst736
      @mst736 Před 6 měsíci

      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 Před 3 lety +108

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

    • @FelipeDiaz-tt3zj
      @FelipeDiaz-tt3zj Před 3 lety

      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 Před 3 lety +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 Před 5 měsíci

      +1

  • @raspberrybabe27
    @raspberrybabe27 Před 9 měsíci +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

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

  • @shyam.upadhyay
    @shyam.upadhyay Před 2 lety +10

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

  • @Acid15ful
    @Acid15ful Před rokem +4

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

  • @mummahadarsal3739
    @mummahadarsal3739 Před 2 lety +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 Před rokem +1

    amazing personality, love your channel!

  • @pavelkvasnicka6856
    @pavelkvasnicka6856 Před rokem +4

    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

  • @hayamitani5462
    @hayamitani5462 Před 2 lety +2

    You're actually really helpful thank you :)

  • @timaya6
    @timaya6 Před rokem

    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

  • @slade8863
    @slade8863 Před 2 lety

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

  • @DevWithEv
    @DevWithEv Před 2 lety +1

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

  • @fredericoamigo
    @fredericoamigo Před 2 lety

    Good content a usual. Keep up the good work!

  • @12bradleyd
    @12bradleyd Před 2 lety

    Super helpful videos! Thanks for making these

  • @TheMurdok77
    @TheMurdok77 Před 3 měsíci

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

  • @theximera13
    @theximera13 Před 10 měsíci

    pretty comprehensive explanation, thanks!

  • @chaithdridi2718
    @chaithdridi2718 Před 3 lety +4

    You are doing an amazing job Bro 😍

  • @ThomasTheThermonuclearBomb

    Thanks for explaining so well!

  • @mehranabbasi8248
    @mehranabbasi8248 Před rokem

    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!

  • @oguzoguz4686
    @oguzoguz4686 Před rokem +1

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

  • @ligdjumvidja8294
    @ligdjumvidja8294 Před 3 měsíci

    Brilliant video thanks a lot !

  •  Před měsícem

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

  • @saeedajax4764
    @saeedajax4764 Před 2 lety

    Great teaching. thanks

  • @richardnunley7681
    @richardnunley7681 Před 4 měsíci

    This helped me so much thank you!

  • @honoredegg
    @honoredegg Před 2 lety +1

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

  • @bartomiejsniadach5795
    @bartomiejsniadach5795 Před 2 lety

    Now it is so simple. Thank you

  • @zahidbond
    @zahidbond Před 2 lety

    Bro you are breathtaking🙇‍♂

  • @HamedAthari
    @HamedAthari Před rokem

    love your teaching

  • @jojovstojo
    @jojovstojo Před rokem +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 Před 6 měsíci

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

  • @danny.3036
    @danny.3036 Před 3 lety

    Thanks, Bro! ☕ You're awesome!

  • @yousifshm
    @yousifshm Před 2 lety

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

  • @kirillutsenko9306
    @kirillutsenko9306 Před 2 lety

    thx a lot for your job

  • @anjapietralla5767
    @anjapietralla5767 Před 5 měsíci

    I already learnd so much thank you

  • @marcosdidierdrogbachagaslo286

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

  • @ahmadfares324
    @ahmadfares324 Před 2 lety

    my fellow bro, you are awesome❤

  • @andycadcam2265
    @andycadcam2265 Před 2 lety

    Incredible !

  • @robertalexandermendezfamil8103

    thanks a lot, Bro Code you are a hero!

  • @noah77
    @noah77 Před 3 lety +1

    Ayyyy, nice!

  • @cesara9747
    @cesara9747 Před 2 lety

    master of the universe!

  • @moumenzineb6672
    @moumenzineb6672 Před rokem

    Thank you so much bro, amazing job

  • @Kd12334
    @Kd12334 Před měsícem

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

  • @dllm3tommy741
    @dllm3tommy741 Před 8 měsíci

    Thanks for the video

  • @diegocatez7181
    @diegocatez7181 Před 2 lety

    Cool!👍 Hope you already got static explain))

  • @rownakmallick2426
    @rownakmallick2426 Před 3 měsíci

    great video!!

  • @yahiakhalil5658
    @yahiakhalil5658 Před 3 lety

    Great ♥️

  • @user-wb7zv4fr4z
    @user-wb7zv4fr4z Před rokem

    thank you for this course.

  • @fryingpanm6977
    @fryingpanm6977 Před 25 dny

    i am saving this channel. so i am a hero

  • @jaylordjl6337
    @jaylordjl6337 Před 2 lety

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

  • @victortruong1524
    @victortruong1524 Před rokem

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

  • @user-zq6yx7of5f
    @user-zq6yx7of5f Před rokem

    Thank you very much

  • @JuliHoffman
    @JuliHoffman Před 2 lety

    So helpful!

  • @sakalansnow6579
    @sakalansnow6579 Před rokem

    great job

  • @ktos2144
    @ktos2144 Před 2 lety

    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

  • @technicalresi5451
    @technicalresi5451 Před 4 měsíci

    Very nice bro 😊❤

  • @dominiquedevries9972
    @dominiquedevries9972 Před 2 lety

    Bro, your are my bro!

  • @ardcodelover
    @ardcodelover Před rokem

    Realy outstanding

  • @bekturasanbekov1979
    @bekturasanbekov1979 Před rokem

    thx 4 vid bro !

  • @TheEvertonDias
    @TheEvertonDias Před rokem

    Thanks, bro!

  • @medjl6083
    @medjl6083 Před 3 lety +3

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

  • @amzie8412
    @amzie8412 Před 11 měsíci

    Thx bro you are our sun tzu 🙏

  • @samankucher5117
    @samankucher5117 Před 2 lety

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

  • @enigmatimson4565
    @enigmatimson4565 Před 3 lety

    very cool 😎

  • @abdialemu8391
    @abdialemu8391 Před rokem

    Love it

  • @nikitassouvatzis1928
    @nikitassouvatzis1928 Před rokem

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

  • @anatolisavin3155
    @anatolisavin3155 Před 3 lety +1

    will you ever teach spring ?

  • @mihriomar5158
    @mihriomar5158 Před rokem

    Thank you 😇

  • @yousefsammar176
    @yousefsammar176 Před 2 měsíci

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

  • @alyymibeal5485
    @alyymibeal5485 Před 3 lety

    Cool :)

  • @yevgenomelchenko732
    @yevgenomelchenko732 Před rokem

    Thanks Bro

  • @eugenezuev7349
    @eugenezuev7349 Před 2 měsíci

    thank you, Bro

  • @praveenbalajikalla-ng6mx
    @praveenbalajikalla-ng6mx Před 3 měsíci

    niceee bro

  • @developerjunior446
    @developerjunior446 Před 3 lety +1

    Bro super

  • @gagandwaz1158
    @gagandwaz1158 Před 2 lety

    Thank you bro :)

  • @cherry6280
    @cherry6280 Před 10 měsíci

    thankyou bro👌👌

  • @ibrahimylmaz8378
    @ibrahimylmaz8378 Před 2 lety

    thanks bro

  • @MrLoser-ks2xn
    @MrLoser-ks2xn Před 2 lety

    Thanks

  • @shashinduthathsara5923

    Thank you bro!

  • @soumelee5661
    @soumelee5661 Před rokem

    nice vid

  • @baharalgun6891
    @baharalgun6891 Před 2 lety

    Thank you

  • @hmmmmokayidc
    @hmmmmokayidc Před rokem

    thank you

  • @huuloc8719
    @huuloc8719 Před 2 lety

    Nice.

  • @nirnoychatterjee7908
    @nirnoychatterjee7908 Před rokem

    Please suggest projects in java to increase my hold in java

  • @percivalgebashe4376
    @percivalgebashe4376 Před rokem

    Nice

  • @biswajeet9826
    @biswajeet9826 Před 18 dny

    Thanks Bruh!!❤😊

  • @Mey_xos
    @Mey_xos Před 2 lety

    Super

  • @quanyufeng579
    @quanyufeng579 Před 2 lety

    Thanks!!

  • @tontusgaming7589
    @tontusgaming7589 Před rokem

    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?

  • @ardcodelover
    @ardcodelover Před rokem

    Good sir

  • @tonytonychopper4525
    @tonytonychopper4525 Před 8 měsíci

    nice

  • @BakhtimurodPrimov
    @BakhtimurodPrimov Před rokem

    thanks

  • @tamirrozenfeld3572
    @tamirrozenfeld3572 Před rokem

    THANK!

  • @sergiogv5107
    @sergiogv5107 Před 3 lety

    thanks!!

  • @brobroo6154
    @brobroo6154 Před rokem

    good

  • @TWVVermin
    @TWVVermin Před 2 lety

    thank you.

  • @mrcapybara3579
    @mrcapybara3579 Před rokem

    They're very similar to functions in C

  • @mohamedelfadli3125
    @mohamedelfadli3125 Před rokem

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

  • @abhijaiallgamesgamer2075
    @abhijaiallgamesgamer2075 Před měsícem +2

    I AM YOUR SAVIOUR (i commented and saved you)

  • @Criticizeer
    @Criticizeer Před rokem

    op

  • @adityaalshi7081
    @adityaalshi7081 Před 2 lety

    ❤️