Slides OOP Part 1 Inheritance Inheritance Part 1
Slides OOP Part 1 Inheritance Inheritance Part 1
Using extends specifies the superclass (or the parent class) of the class we're
declaring.
We can say Dog is a subclass, or child class, of Animal.
We can say Animal is a parent, or super class, of Dog.
A class can specify one, and only one, class in its extends clause.
If you don't make a call to super(), then Java makes it for you, using super's default
constructor.
If your super class doesn't have a default constructor, than you must explicitly call
super() in all of your constructors, passing the right arguments to that constructor.