9.4 super Keyword
Enduring Understanding
When multiple classes contain common attributes and behaviors, programmers create a new class containing the shared attributes and behaviors forming a hierarchy. Modifications made at the highest level of the hierarchy apply to the subclasses.
Learning Objective
Create an inheritance relationship from a subclass to the superclass.
Essential Knowledge
The keyword super can be used to call a superclass’s constructors and methods.
The superclass method can be called in a subclass by using the keyword super with the method name and passing appropriate parameters.
Last updated
Was this helpful?