Java methods 📞

  Рет қаралды 136,692

Bro Code

Bro Code

Күн бұрын

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;
}
}

Пікірлер: 173
@BroCodez
@BroCodez 4 жыл бұрын
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 9 ай бұрын
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 жыл бұрын
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 жыл бұрын
@@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 9 ай бұрын
+1
@shyam.upadhyay
@shyam.upadhyay 2 жыл бұрын
"It doesn't matter what you do." -- Bro
@BroCodez
@BroCodez 2 жыл бұрын
deep
@yousefsammar176
@yousefsammar176 5 ай бұрын
I have an exam in 12 hours and these videos will save me Thx bro
@mohamadnazirissumalgy3699
@mohamadnazirissumalgy3699 4 жыл бұрын
Bro, you're the best. Your job is priceless!
@pavelkvasnicka6856
@pavelkvasnicka6856 Жыл бұрын
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
@raspberrybabe27
@raspberrybabe27 Жыл бұрын
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!
@Acid15ful
@Acid15ful 2 жыл бұрын
I can count on you to get me thru the boot camp I'm currently in. Appreciate you bro!
@mummahadarsal3739
@mummahadarsal3739 2 жыл бұрын
Sir You are a great teacher i swear the way u explains things are just mind blowing thank u for such type of playlist
@abhijaiallgamesgamer2075
@abhijaiallgamesgamer2075 4 ай бұрын
I AM YOUR SAVIOUR (i commented and saved you)
@jojovstojo
@jojovstojo Жыл бұрын
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 9 ай бұрын
thanks i needed this im watching this same video for the 6th time because i forget what method arguments and parameters every time
@gamerkiplaysss
@gamerkiplaysss 2 жыл бұрын
amazing personality, love your channel!
@TheMurdok77
@TheMurdok77 6 ай бұрын
I watch your videos religiously, they're the best on KZbin.
@slade8863
@slade8863 2 жыл бұрын
Random comment to appreciate this wonderful video, God Bless you man
@g6z19
@g6z19 2 жыл бұрын
You're actually really helpful thank you :)
@chaithdridi2718
@chaithdridi2718 3 жыл бұрын
You are doing an amazing job Bro 😍
@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
@oguzoguz4686
@oguzoguz4686 2 жыл бұрын
I loved the Z trick. They did not teach that in the bootcamp. It is very simple thanks
@DevWithEv
@DevWithEv 2 жыл бұрын
Super useful for beginners like me. Thanks Bro! Happy 2022
@Podcast_Walahm
@Podcast_Walahm 21 күн бұрын
"Bro" Why are yo so good in explaining ?
@honoredegg
@honoredegg 2 жыл бұрын
Methods understood completely, 2d ArrayList used as example. 22th. Thank you, ma Bro Sensei!
@rishenxb1s705
@rishenxb1s705 25 күн бұрын
I must say 3 years later and this video aged like fine wine
@dianamilenaarchilacordoba4632
@dianamilenaarchilacordoba4632 Ай бұрын
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
@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!
@Kd12334
@Kd12334 4 ай бұрын
I was trying to understand this for 2 hours today from various sources, but it seems i just needed this video🎉
@shriyarastogi1-jv1mf
@shriyarastogi1-jv1mf 2 ай бұрын
Thanks bro! you're blessing for us...
4 ай бұрын
Bro code! Great concept! Thanks for the lessons, bro. 😎
@yousifshm
@yousifshm 2 жыл бұрын
thanks Allah that i know your seriuse, you are a true legend bro!
@zahidbond
@zahidbond 2 жыл бұрын
Bro you are breathtaking🙇‍♂
@medjl6083
@medjl6083 3 жыл бұрын
The method in programming, allows you to reuse the code.
@theximera13
@theximera13 Жыл бұрын
pretty comprehensive explanation, thanks!
@dawidmateuszbudkiewicz4938
@dawidmateuszbudkiewicz4938 2 ай бұрын
This is like the 10th time brocode helped me and i'm just getting started!
@txfu-
@txfu- 27 күн бұрын
ikr
@victortruong1524
@victortruong1524 Жыл бұрын
Holy shit ! Take my hand Master :(( !!! I have 5 videos about this topic, but you have lightened my understanding
@kirillutsenko9306
@kirillutsenko9306 2 жыл бұрын
thx a lot for your job
@anjapietralla5767
@anjapietralla5767 8 ай бұрын
I already learnd so much thank you
@richardnunley7681
@richardnunley7681 8 ай бұрын
This helped me so much thank you!
@bartomiejsniadach5795
@bartomiejsniadach5795 2 жыл бұрын
Now it is so simple. Thank you
@fredericoamigo
@fredericoamigo 2 жыл бұрын
Good content a usual. Keep up the good work!
@fryingpanm6977
@fryingpanm6977 4 ай бұрын
i am saving this channel. so i am a hero
@ligdjumvidja8294
@ligdjumvidja8294 6 ай бұрын
Brilliant video thanks a lot !
@jaylordjl6337
@jaylordjl6337 3 жыл бұрын
We’re hoping bro that you can upload a tutorial that java connects to DB :) thankyou
@diegocatez7181
@diegocatez7181 2 жыл бұрын
Cool!👍 Hope you already got static explain))
@Kutakiarikashi
@Kutakiarikashi Сағат бұрын
Thank you !
@marcosdidierdrogbachagaslo286
@marcosdidierdrogbachagaslo286 Жыл бұрын
identico ao conceito de "codar modularizado em python", that's cool!
@ahmadfares324
@ahmadfares324 2 жыл бұрын
my fellow bro, you are awesome❤
@HamedAthari
@HamedAthari 2 жыл бұрын
love your teaching
@cesara9747
@cesara9747 2 жыл бұрын
master of the universe!
@NicholasGJeria
@NicholasGJeria 4 күн бұрын
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?
@anatolisavin3155
@anatolisavin3155 3 жыл бұрын
will you ever teach spring ?
@12bradleyd
@12bradleyd 3 жыл бұрын
Super helpful videos! Thanks for making these
@nikitassouvatzis1928
@nikitassouvatzis1928 2 жыл бұрын
Οι μέθοδοι σε κάθε γλώσσα αντικειμενοστρεφούς προγραμματισμού, είναι πολύτιμες!
@mohamedelfadli3125
@mohamedelfadli3125 Жыл бұрын
is there any difference between functions and methods in java, pls?
@rownakmallick2426
@rownakmallick2426 6 ай бұрын
great video!!
@moumenzineb6672
@moumenzineb6672 Жыл бұрын
Thank you so much bro, amazing job
@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!"
@ardcodelover
@ardcodelover Жыл бұрын
Realy outstanding
@dllm3tommy741
@dllm3tommy741 11 ай бұрын
Thanks for the video
@technicalresi5451
@technicalresi5451 8 ай бұрын
Very nice bro 😊❤
@ThomasTheThermonuclearBomb
@ThomasTheThermonuclearBomb 2 жыл бұрын
Thanks for explaining so well!
@nirnoychatterjee7908
@nirnoychatterjee7908 Жыл бұрын
Please suggest projects in java to increase my hold in java
@praveenbalajikalla-ng6mx
@praveenbalajikalla-ng6mx 6 ай бұрын
niceee 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
@robertalexandermendezfamil8103
@robertalexandermendezfamil8103 2 жыл бұрын
thanks a lot, Bro Code you are a hero!
@SodiqjonNomonjonov-y9n
@SodiqjonNomonjonov-y9n Жыл бұрын
thank you for this course.
@sakalansnow6579
@sakalansnow6579 Жыл бұрын
great job
@曾毓哲-b1t
@曾毓哲-b1t Жыл бұрын
Thank you very much
@developerjunior446
@developerjunior446 3 жыл бұрын
Bro super
@SkyV77
@SkyV77 Ай бұрын
thanks big bro
@andycadcam2265
@andycadcam2265 2 жыл бұрын
Incredible !
@samankucher5117
@samankucher5117 2 жыл бұрын
thanks bro . i watched the add to the end i hope it helps:)
@danny.3036
@danny.3036 3 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@noah77
@noah77 4 жыл бұрын
Ayyyy, nice!
@amzie8412
@amzie8412 Жыл бұрын
Thx bro you are our sun tzu 🙏
@saeedajax4764
@saeedajax4764 2 жыл бұрын
Great teaching. thanks
@dominiquedevries9972
@dominiquedevries9972 3 жыл бұрын
Bro, your are my bro!
@abdialemu8391
@abdialemu8391 Жыл бұрын
Love it
@jaisuperawesome
@jaisuperawesome 2 жыл бұрын
Is this the same thing as Function in python?
@rohmanatasi1771
@rohmanatasi1771 11 ай бұрын
yes,but you probably know by now
@percivalgebashe4376
@percivalgebashe4376 Жыл бұрын
Nice
@tonytonychopper4525
@tonytonychopper4525 Жыл бұрын
nice
@ardcodelover
@ardcodelover Жыл бұрын
Good sir
@JuliHoffman
@JuliHoffman 2 жыл бұрын
So helpful!
@soumelee5661
@soumelee5661 2 жыл бұрын
nice vid
@TheEvertonDias
@TheEvertonDias Жыл бұрын
Thanks, bro!
@yahiakhalil5658
@yahiakhalil5658 3 жыл бұрын
Great ♥️
@yevgenomelchenko732
@yevgenomelchenko732 Жыл бұрын
Thanks Bro
@enigmatimson4565
@enigmatimson4565 3 жыл бұрын
very cool 😎
@huuloc8719
@huuloc8719 2 жыл бұрын
Nice.
@brobroo6154
@brobroo6154 Жыл бұрын
good
@cherry6280
@cherry6280 Жыл бұрын
thankyou bro👌👌
@eugenezuev7349
@eugenezuev7349 5 ай бұрын
thank you, Bro
@mihriomar5158
@mihriomar5158 Жыл бұрын
Thank you 😇
@tontusgaming7589
@tontusgaming7589 2 жыл бұрын
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?
@alyymibeal5485
@alyymibeal5485 3 жыл бұрын
Cool :)
@rohitbharatbhandwalkar8583
@rohitbharatbhandwalkar8583 Жыл бұрын
So basically Methods in Java is like functions in C
@MrLoser-ks2xn
@MrLoser-ks2xn 2 жыл бұрын
Thanks
@ibrahimylmaz8378
@ibrahimylmaz8378 2 жыл бұрын
thanks bro
@Mey_xos
@Mey_xos 2 жыл бұрын
Super
@mrcapybara3579
@mrcapybara3579 2 жыл бұрын
They're very similar to functions in C
@Criticizeer
@Criticizeer Жыл бұрын
op
@bekturasanbekov1979
@bekturasanbekov1979 Жыл бұрын
thx 4 vid bro !
Java overloaded methods ☎️
5:39
Bro Code
Рет қаралды 84 М.
Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
11:29
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 28 МЛН
GIANT Gummy Worm Pt.6 #shorts
00:46
Mr DegrEE
Рет қаралды 119 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 125 МЛН
Java objects (OOP) ☕
10:46
Bro Code
Рет қаралды 178 М.
Java static keyword ⚡
8:18
Bro Code
Рет қаралды 115 М.
How are holograms possible? | Optics puzzles 5
46:24
3Blue1Brown
Рет қаралды 263 М.
Java constructors 👷
10:37
Bro Code
Рет қаралды 183 М.
Java printf 🖨️
11:22
Bro Code
Рет қаралды 120 М.
Java exception handling ⚠️
7:53
Bro Code
Рет қаралды 110 М.
Java encapsulation 💊
8:27
Bro Code
Рет қаралды 114 М.
Java polymorphism 🏁
6:12
Bro Code
Рет қаралды 121 М.
Java HashMap 🗺️
13:05
Bro Code
Рет қаралды 84 М.
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 28 МЛН