} } //*************************************** 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
best teacher ever
!!!!!!!!!!!!!!!!!!!! you made my life easy God bless you and your beloved ones for ever !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you Bro. No confusion, straight to the point, no BS
Super awesome Java tutorial! 👍🏼 I learn a lot from here!
This was great. My professor is making it his life's work to make sure I dont understand inheritance.
Simple yet an amazing explanation
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!
beautifully explained I really appreciate the turorial, thanks!
Thanks for making it short and having nothing useless
probably one of the most comprehensive java tutorials, without cutting corners :D
Great Explanation as Always
You made this super simple to understand. Thank you.
Very awesome video
I love you man, I learn 99% from you and 1% from school
Your 6-minute video made the bootcamp LMS content much easier to understand. Much appreciated!
thanks bro, got an assignment due in one week, thanks for the help my guy
stop lying bro im your classmate
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
Bro just out here saving lives and time. Thanks Bro
Great Class
Good video. Thanks for the applied example
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.
Thank you, can't wait to use this to start my own business
You probably the best teacher 🔥
Impressed by your teaching skills.
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.
thanks for making it so easy to understand, awesome video, no more neither less information of what i needed
Great straight forward explanation. Thank you!
Your tutorials are the best there are!
You made it extremely easy to understand. Thank you man
Clear and informative. Thanks!
Clean teaching... underrated channel bro
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
Awesome! Incredibly clear, unlike my teacher :(
thx brah... your Java series is legit
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
teaching was straight to the point bro code!
Thanks for this, it has been very easy to grasp the concept with your explanation
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
Liked Commented and subscribed
Tank you, very excellent explanation
Very easiy explaing thank you
Very Injecting concept video
for those it may concern he's using the Eclipse IDE...Nice java conding 🤗
very good video
helpful it is
Love from Kenya... manze unatuokolea
Great teaching 👏
Thank you so much for this tutorial!! It was very comprehensive and helpful.
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
Thank you! I enjoyed the explanation of inheritance in just a short video.
thank you for the simple video
"Sit back, relax, and enjoy the show". Every time when I watch your video, I repeat that with you lol
thank you for enlighten me.. its very useful in my study
Amazing teaching. Thx
omg! thank you for making it much more easier to understand.
bro thank u best tutorial on thye internet
Cool work...👍
Great video as always, keep the good work !!
Great tutorial. Thanks!
Your teaching way is very good. Keep it up. Watching from Ethiopia
marvellous job
best tutorial I found Thank you!. You got a new Subscriber
'
Fantastic video
Thank you for that video......
Liked and subscribed, great stuff man your content is very helpful
this was helpful, thank you bro
Understood, inheritance, which both things have in common. 34th. Thank you, ma Bro Sensei!
great video
I won’t skip any advertisement in order to support u
Thanks for this video
Love from India❤
Thanks, Bro! ☕ You're awesome!
Cool explanation!!!
Thank, great presentation!
Thanks it was very clear.
Found it helpful.Thanks!
Very useful tutorial!
Awesome lecture Bro, got my doubts cleared.
Great class, Thanks
Thnx bro it helps me so gud
That's really good
splendid
heeey bro, i have exam tomorrow and guess what?! you are my savior
I am very Usefull
Awesome!!!!!!!!!!!!
I love your videos .
Can you make videos on Spring ,Spring boot, hibernate
keep going
good go!!
Great.
Superb
good, good...
Great
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
Nice my bro
How can he explain such an overwhelming topic so easily??