} } //*************************************** public class Vehicle{ double speed; void go(){ System.out.println("This vehicle is moving"); } void stop(){ System.out.println("This vehicle is stopped"); } } //*************************************** public class Car extends Vehicle{ int wheels = 4; int door = 4; } //*************************************** public class Bicycle extends Vehicle{ int wheels = 2; int pedals = 2; } //***************************************
@@marcoslightspeed5517 it gets way more difficult than this, its good he's showing you guys now so that you don't struggle when you actually have to use a lot of classes( which is always especially considering the topic inheritance)
best teacher ever !!!!!!!!!!!!!!!!!!!! you made my life easy God bless you and your beloved ones for ever !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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
amazing, thank you, so i want to review what i have learned from your tutotiral, a subclass inherits all instance variables and methods from the superclass without redeclaring them in the subclass. we can also add extra instance variables or methods that are different from the superclass. In order to achieve inheritance, the key word extends is used in the class header of the subclass with the name of the super class.
//***************************************
public class Main {
public static void main(String[] args) {
// inheritance = the process where one class acquires,
// the attributes and methods of another.
Car car = new Car();
car.go();
Bicycle bike = new Bicycle();
car.go();
bike.stop();
System.out.println(car.doors);
System.out.println(bike.pedals);
}
}
//***************************************
public class Vehicle{
double speed;
void go(){
System.out.println("This vehicle is moving");
}
void stop(){
System.out.println("This vehicle is stopped");
}
}
//***************************************
public class Car extends Vehicle{
int wheels = 4;
int door = 4;
}
//***************************************
public class Bicycle extends Vehicle{
int wheels = 2;
int pedals = 2;
}
//***************************************
Bro in Vehicle class you use 2 methods name go :) I think one of them is Stop
you repeated the same method (& arguments) for the Vehicle class
Bro inherited awesome teaching skills from parent class.
*cough cough* no.
@@urimsuh why
lol
used 3 classes for a first example lol
@@marcoslightspeed5517 it gets way more difficult than this, its good he's showing you guys now so that you don't struggle when you actually have to use a lot of classes( which is always especially considering the topic inheritance)
You are hands down the best code teacher on TH-cam.
Clear and straight to the point. Thank you
you have no idea how better this video made me feel thank you so much college been really overwhelming so far
Thank you Bro. No confusion, straight to the point, no BS
best teacher ever
!!!!!!!!!!!!!!!!!!!! you made my life easy God bless you and your beloved ones for ever !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I spent much time to understand this program but once watching your video made it very simple for me. Thank you so much for this video.
Prayers answered! Most straight forward explanation I’ve seen!
This was great. My professor is making it his life's work to make sure I dont understand inheritance.
Your 6-minute video made the bootcamp LMS content much easier to understand. Much appreciated!
Simple yet an amazing explanation
Tysm for these videos! I love learning how to code but had to drop my Java class to make room for a period of basketball. Now I can do both :)
@Milan Walker i’ve tried it. didn’t work.
Thanks for making it short and having nothing useless
Super awesome Java tutorial! 👍🏼 I learn a lot from here!
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
probably one of the most comprehensive java tutorials, without cutting corners :D
Great Explanation as Always
Bro just out here saving lives and time. Thanks Bro
beautifully explained I really appreciate the turorial, thanks!
I love you man, I learn 99% from you and 1% from school
You made this super simple to understand. Thank you.
Thank you, can't wait to use this to start my own business
thanks bro, got an assignment due in one week, thanks for the help my guy
stop lying bro im your classmate
thanks for making it so easy to understand, awesome video, no more neither less information of what i needed
Good video. Thanks for the applied example
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
You probably the best teacher 🔥
Your tutorials are the best there are!
Thank you so much for this tutorial!! It was very comprehensive and helpful.
Impressed by your teaching skills.
Very awesome video
Clean teaching... underrated channel bro
Thanks for this, it has been very easy to grasp the concept with your explanation
Nice tutorials.. keep on
Bring all kinds of java sessions as animated 5 to 10 min clips
or a 20 - 40 min big sessions
but fundamental and example
You made it extremely easy to understand. Thank you man
bro thank u best tutorial on thye internet
Cool work...👍
Damn nobody wanted to get straight to the point But you are a very awesome teacher I got a find out more content from you
thx brah... your Java series is legit
Great straight forward explanation. Thank you!
This video taught me that you need to extend the class itself if you want that subclasses objects to be able to call the method.
best tutorial I found Thank you!. You got a new Subscriber
'
Great Class
Clear and informative. Thanks!
Nice !!
Thank you! I enjoyed the explanation of inheritance in just a short video.
Awesome! Incredibly clear, unlike my teacher :(
teaching was straight to the point bro code!
thank you for enlighten me.. its very useful in my study
Your teaching way is very good. Keep it up. Watching from Ethiopia
"Sit back, relax, and enjoy the show". Every time when I watch your video, I repeat that with you lol
Great teaching 👏
Tank you, very excellent explanation
The best 👏👏👏👏
amazing, thank you, so i want to review what i have learned from your tutotiral, a subclass inherits all instance variables and methods from the superclass without redeclaring them in the subclass.
we can also add extra instance variables or methods that are different from the superclass. In order to achieve inheritance, the key word extends is used in the class header of the subclass with the name of the super class.
you got it
very good video
helpful it is
Liked and subscribed, great stuff man your content is very helpful
Liked Commented and subscribed
I love your videos .
Can you make videos on Spring ,Spring boot, hibernate
omg! thank you for making it much more easier to understand.
Great video as always, keep the good work !!
Amazing teaching. Thx
Very Injecting concept video
Very easiy explaing thank you
Great tutorial. Thanks!
Awesome!!!!!!!!!!!!
thank you for the simple video
Awesome lecture Bro, got my doubts cleared.
Love from Kenya... manze unatuokolea
Thank, great presentation!
Thank you for that video......
marvellous job
Thanks, Bro! ☕ You're awesome!
Cool explanation!!!
Found it helpful.Thanks!
Fantastic video
this was helpful, thank you bro
Very useful tutorial!
great video
Thanks bro! excellent video 🏁🏁
Thnx bro it helps me so gud
thanks for the video! easy to understand and straight to point
Thank you for the great tutorial!
One thing I am wondering about is how I would set the speed for each subclass.
by making its constructor in parent class...& later on i would love to see ur speed
Thanks it was very clear.
Love from India❤
You made that look easy! Thank you!!!
Great class, Thanks
YOOOH BROH, THESE NEW VIDEOS ARE AWESOME, FINISHED ONE...MAY YOU PLEASE GROUP THESE NEW VIDEOS WITH THE JAVA PLAYLIST👍🏿
Don't worry, I'm updating the Java playlist
@@BroCodez Thanks Bro
Thanks for this video
I won’t skip any advertisement in order to support u
Great job! thx a lot
That's really good
Cool work!
Thanks for another one 🙏
for those it may concern he's using the Eclipse IDE...Nice java conding 🤗
Amazing as always.
Very good course, thank you
I love you and your channel 💙
Thanks Nima!
what keyboard are you using? Sounds very satisfying