Hello guys , Let’s go over the concept on how we can achieve inheritance.
To be straight to the point to those in rush hour. you use the keyword : extends
Now , for the rest let’s take a deeper dive into the code .

Let’s create a base class , that contains a method ( all of the code will be available at the very bottom, of the page as a link to the Repository from my GitHub)

We create a new class named Ferrari and we write extends to our base class Cars .
Let’s do the same for another class called Tesla

We will call them now in our main class

Remember that our 2 SUBCLASSES didn’t have any methods inside of them right ? : how is this going to work you might ask .
Well , when you extend a subclass to a parent class what you are doing is obtaining everything inside the parent class. So even if we don’t see anything inside of those 2 classes. We must have faith, in our programming languague !
OUTPUT :

Look at that it did work ! , awesome so now we know how to inherite by using the keyword extends !!!.
https://github.com/ValorWind1/Java_Review_1.0/tree/master/src/java_youtubeclips/inheritance