Superclass Non-Empty Constructors and Methods
Learn about non-empty constructors and superclass methods.
Inheriting non-empty constructors
So far, we have inherited only from classes with empty constructors, so when we were specifying the superclass, we used empty parentheses. However, if the superclass has constructor parameters, we need to define some arguments inside these parentheses.
Get hands-on with 1300+ tech skills courses.