Test 2
If a class contains an abstract method:
You cannot create an instance of the class. The method will have only a header, but not a body, and end with a semicolon. The method must be overridden in subclasses.
If ClassA extends ClassB, then:
Public members in ClassB are public in ClassA, but private members in ClassB cannot be directly accessed in ClassA.
An abstract class is not instantiated, but serves as a superclass for other classes.
True
It is not possible for a superclass to call a subclass's method.
True
Private members of the superclass cannot be accessed by the subclass.
True
All methods in an abstract class must also be declared abstract.
False
Inheritance involves a subclass, which is the general class, and a superclass, which is the specialized class.
False
Replacing inadequate superclass methods with more suitable subclass methods is known as what?
Method overriding
A protected member of a class may be directly accessed by:
Methods of the same class. Methods of a subclass. Methods in the same package.
The super statement that calls the superclass constructor:
must be the first statement in the subclass's constructor
If you do not provide an access specifier for a class member, the class member is given ________ by default.
package access
Every class has a toString method and an equals method inherited from the Object class
True
When an "is a" relationship exists between objects, it means that the specialized object has:
all the characteristics of the general object, plus additional characteristics
What key word can you use to call a superclass constructor explicitly?
super
When an interface variable references an object, you can use the interface variable to call any and all of the methods in the class implementing the interface.
False