Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Inheritance in Java!
You have completed Inheritance in Java!
Preview
In Java every class either directly or indirectly inherits from Object. We'll explore more about what this means in this video.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
But whenever you see the extends keyword,
I want you to also think of the word is.
0:00
So from our first example, a B is an A.
0:03
Or more recently, a dog is an animal.
0:07
Or for a bigger example, a car, a bus,
and a motorcycle are all ground vehicles.
0:11
While planes and
helicopters are air vehicles.
0:17
And they all have a common
base class with vehicle.
0:21
So a car is a ground vehicle and
is a vehicle.
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up