2 Flashcards
To achieve inheritance in Java, use ____ keyword.
extend
Inheritance is a ________; a child inherits from a parent, not the other way around.
one-way proposition
child classes are more ____ than the parent class they extend
specific
To override a field or method in a child class means to use the ________.
child’s version instead of the parent’s version.
When Java developers refer to methods that work appropriately for subclasses of the same parent class, the more specific term is _____ ______.
subtype polymorphism.
The __ _______ lets the compiler know that your intention is to override a method in the parent class rather than create a method with a new signature.
override annotation
When you instantiate an object that is a member of a child class, you actually are calling both the constructor for the parent class and the constructor for the extended, child class. When you create any child class object, ____, ________.
the parent class constructor must execute first, and then the child class constructor executes.
The keyword ____ always refers to the superclass of the class in which you use it.
super
the _________ must be the first statement in any subclass constructor that uses it.
super() statement