CSCI-C201 Quiz 3
A(n) __________ method is a method that appears in a superclass but expects to be overridden in a subclass.
abstract
When an "is a" relationship exists between objects, the specialized object has __________.
all of the characteristics of the general object plus additional characteristics
In the following code, which line has an error? public interface Interface1 { int FIELDA = 55; public int methodA(double){} }
line 4
In Java, a reference variable is __________ because it can reference objects of types different from its own, as long as those types are related to its type through inheritance.
polymorphic
The __________ key word is used to call a superclass constructor explicitly.
super
If a class contains an abstract method __________.
the method will only have a header, but not a body, and will end with a semicolon
In an inheritance relationship __________.
the superclass constructor always executes before the subclass constructor
__________ tells the Java compiler that a method is meant to override a method in the superclass.
@Override
Which of the following is true about protected access?
Protected members may be accessed by methods in the same package or in a subclass, even when the subclass is in a different package.