Create An Inheritance In Code

If you have a class that you want to inherit all of its properties and methods from, you use the keyword EXTENDS and specify the class you want to inherit:

public class  myChildClass extends myParentClass {...}
In Java, you use the @Override syntax to create a new class to replace the implementation of the method of a superclass.

EXAMPLE GOES HEREā€¦

To call an existing method (instead of replacing a method) in the parent class from the child class you use the keyword super follow by the name of the method that appears in the superclass.

super.myParentMethod();