//********************************************** public class Main { public static void main(String[] args) {
Garage garage = new Garage();
Car car1 = new Car("BMW"); Car car2 = new Car("Tesla");
garage.park(car1); garage.park(car2);
} } //********************************************** public class Garage { void park(Car car) { System.out.println("The "+car.name+" is parked in the garage"); } }//********************************************** public class Car { String name;
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
Man, at first, i just wanted to learn java to make minecraft mods. After watching your videos, now i want to learn other languages too. You are great, much love ❤
Bro code is incredible. So fun and easy to learn. I am a self learner. So far I feel that I do not need anyone help to learn Java 😂😂. Bro is more than enough. ❤. To point and short & all necessary explanations
@@BroCodez Even if you don't have time, the thing is, with Discord, someone in the community may have an answer to our concern. We just need real-time interactions, sometimes, for very few specifics problems that do not necessarily need a video to be made for. Hope you understand.
If you had a second method in garage to park motorcycles, you would have it call a motorcycle object as well but both would exist within garage, correct?
Object passing Passing an object as an argument to a method public class Main { public static void main(String[] args) { Warehouse warehouse = new Warehouse(); Commodity commodity1 = new Commodity("corn"); Commodity commodity2 = new Commodity("soya bean"); warehouse.stock(commodity1); warehouse.stock(commodity2); } } **************** public class Warehouse{
void stock(Commodity commodity){ System.out.println("The "+commodity.article+" is stocked in the warehouse"); } } ********* public class Commodity{ String article; Commodity(String article){ this.article = article; } }
Bro what is benefit of passing object to a method in actual programming? is it for placing some data then using them later ? is it relevant to Data binding?
@@sahirbadr8901 I get it i've completed java Gui and oop now I realize why do we use it, it has several benifits in polymorphism aggrigation and downcasting classes and in relationships between classes, reduces creating object in method only we pass reference to method for memory complexity avoiding redundancy. That was 4 month ago nearly 5, I had no clue what was object and passing via parameters
Both of these are not initialized they are just declared. I guess what u wanted to ask was access modifiers. "int age" is default access modifier which means it can be used inside the package where it was declared. Whereas "public int age" means it can be used outside the package and pretty much any where else. I hope this answers your doubt.
//**********************************************
public class Main {
public static void main(String[] args) {
Garage garage = new Garage();
Car car1 = new Car("BMW");
Car car2 = new Car("Tesla");
garage.park(car1);
garage.park(car2);
}
}
//**********************************************
public class Garage {
void park(Car car) {
System.out.println("The "+car.name+" is parked in the garage");
}
}//**********************************************
public class Car {
String name;
Car(String name){
this.name = name;
}
}}//**********************************************
What a brilliant way of teaching code! I'm not good at English but I can understand almost what you say in video! Thank you so much!
I really appreciate your brilliant way of teaching. It was awsome ;)
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
nice explanation.
Thanks for the videos.
Easy to understand this is what i need 👍
Awesome teacher
nice vid very good explanation
Thanks Bro for this Series, i'm a Python Guy, but i'm enjoying getting the info again for Java
Channel name is beautiful 👌🙏🏻
enjoying this java tutorial, hoping for project based tutorial for java☺️☺️☺️
thankyou sir its my exam tommorow and you have clear my concept
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
Great explanation!Thank you
thank you bro you are a life saver
Man, at first, i just wanted to learn java to make minecraft mods. After watching your videos, now i want to learn other languages too. You are great, much love ❤
wow cool dude
your awesome I did not know you can create minecraft mods using java
great explination
nycc
Bro code is incredible. So fun and easy to learn. I am a self learner. So far I feel that I do not need anyone help to learn Java 😂😂. Bro is more than enough. ❤. To point and short & all necessary explanations
Another simple example, thanks.
clear, concise. Liked.
Nice
Please do the road map, what to study in JAVA to get a job. Thank you so much
you are the absolute best bro. i love you bro
Well explained! Bro
thanks for watching Codle
Best broooo
NIce.
how do you only have 11k subs I've recommended you to like every new coder I know
thanks Nik!
Thanks, Bro! ☕ You're awesome!
Thank you so much Sir ..
nice
easy to understand
Bro is just a lifesaver
lets go bro
this may seem weird I love how you put a symbol or picture after your title!!
Do you happen to have a discord by any chance? would be really helpful to get help on more specific problems! Other wise amazing videos!
I'd love to, but I don't think I could handle a discord right now. Maybe in the future when I have more time I could
@@BroCodez Even if you don't have time, the thing is, with Discord, someone in the community may have an answer to our concern. We just need real-time interactions, sometimes, for very few specifics problems that do not necessarily need a video to be made for. Hope you understand.
Lets goooo!
Thank bro
If you had a second method in garage to park motorcycles, you would have it call a motorcycle object as well but both would exist within garage, correct?
Thank you Bro
thanks bro 🙏
Thank you very much
thank you my Bro ♥♥♥
nice!
love you broski
my friend, will you ever teach spring ? java for web. I'm willing to pay you for a course like that. create a patreon !
Yeah!!
This! Please! I'd gladly pay for a Spring course from you!!!
How to contact the instructor, is he having a website
Nicee!!
Very good thank you!
Thanks, Bro!
Great job!
king
Object passing
Passing an object as an argument to a method
public class Main
{
public static void main(String[] args) {
Warehouse warehouse = new Warehouse();
Commodity commodity1 = new Commodity("corn");
Commodity commodity2 = new Commodity("soya bean");
warehouse.stock(commodity1);
warehouse.stock(commodity2);
}
}
****************
public class Warehouse{
void stock(Commodity commodity){
System.out.println("The "+commodity.article+" is stocked in the warehouse");
}
}
*********
public class Commodity{
String article;
Commodity(String article){
this.article = article;
}
}
thanks bro
well explained!
Understood with using integers. 32th. Thank you, ma Bro Sensei!
Thanks Bro
ThanksBRO
for the algorithm
thank you so much ❤
gerade vid as always
Thank you so much sir.
Yeah Bro !
❤️🙌👌
Thanks, bro.
your voice is very clear which software and mic do you use for recording videos
Thanks Bro Code!
thank you bro
thanks
Thank you
❤
thx bro 🤙
the examples in the video. Could it be called injection dependency?
thankk you smmmmmm
how the non static method worked in a static class???
the method bark in the class main
gg
Bro what is benefit of passing object to a method in actual programming? is it for placing some data then using them later ? is it relevant to Data binding?
I believe this is just a simple way of explaining how it works, later on the objects getting passed are entered via user input
@@sahirbadr8901 I get it i've completed java Gui and oop now I realize why do we use it, it has several benifits in polymorphism aggrigation and downcasting classes and in relationships between classes, reduces creating object in method only we pass reference to method for memory complexity avoiding redundancy.
That was 4 month ago nearly 5, I had no clue what was object and passing via parameters
@@W3r3-w0lf thanks for telling me, I didn't even know that!
Thanks
thank you for watching Azlee!
🚘
You didn't discussed technicalities..what happens behind the scene..😊
👍
Thanks, Bro 06/08/2024
thank you.
I am a fellow bro !
ty
learnt but can rewatch
What's the difference between these two initialized variables?
public int age;
int age;
Both of these are not initialized they are just declared. I guess what u wanted to ask was access modifiers.
"int age" is default access modifier which means it can be used inside the package where it was declared.
Whereas "public int age" means it can be used outside the package and pretty much any where else.
I hope this answers your doubt.
THANKS BRO LY
Luv U 2 NO HOMO
Bro Code is my love! I will fight you for him ⚔
I'm subscribed to you on three different accounts (school, "work" and normal)
I am your biggest SIMP
car two park on that garage
Anyone know why he doesn’t have to put public in the constructors?
need new videos!
Ένα ακόμα σημαντικό μάθημα για τα αντικείμενα στη Java.
1
:)
Hi
Hey YOU 🫵