Inheritance
Inheritance lets one class reuse and extend another. The child class uses extends.
Call super() to run the parent constructor, and super.method() to use a parent method.
Inheritance models an "is a" relationship, like a Dog is an Animal.
Try it yourself
Loading editor…