Chapter 10 - Part 3
The ________ key word is used to call a superclass constructor explicitly.
super
What is wrong with the following code? public class ClassB extends ClassA { public ClassB() { int init = 10; super(40); } }
The call to the method super must be the first statement in the constructor.
What is required for an interface method that has a body?
The method header must begin with the key word default.
All fields declared in an interface ________.
are treated as final and static
Replacing inadequate superclass methods with more suitable subclass methods is known as ________.
method overriding
A subclass can directly access ________.
only public and protected members of the superclass
A subclass may call an overridden superclass method by ________.
prefixing its name with the super key word and a dot (.)
A ________ member's access is somewhere between public and private.
protected
What type of relationship exists between two objects when one object is a specialized version of another object?
"is a"
A protected member of a class may be directly accessed by ________.
Any of these
T/F: A compiler error will result if an anonymous inner class tries to use a variable that is not final, or not effectively final.
True
A class becomes abstract when you place the ________ key word in the class definition.
abstract
A(n) ________ method is a method that appears in a superclass but expects to be overridden in a subclass.
abstract
When a method is declared with the ________ modifier, it cannot be overridden in a subclass.
final
T/F: A functional interface is simply an interface that has one abstract method.
True
T/F: When a subclass extends a superclass, the public members of the superclass become public members of the subclass.
True