2 Flashcards

1
Q

To achieve inheritance in Java, use ____ keyword.

A

extend

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Inheritance is a ________; a child inherits from a parent, not the other way around.

A

one-way proposition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

child classes are more ____ than the parent class they extend

A

specific

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To override a field or method in a child class means to use the ________.

A

child’s version instead of the parent’s version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When Java developers refer to methods that work appropriately for subclasses of the same parent class, the more specific term is _____ ______.

A

subtype polymorphism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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.

A

override annotation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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, ____, ________.

A

the parent class constructor must execute first, and then the child class constructor executes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The keyword ____ always refers to the superclass of the class in which you use it.

A

super

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

the _________ must be the first statement in any subclass constructor that uses it.

A

super() statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly