Polymorphism quiz
1. Polymorphism:
-Enables “programming in the general”;
-The same invocation can produce “
many forms” of results;
a. TRue
2. Interfaces:
Implemented by classes to assign common functionality to possibly unrelated classes.
a. True
3. A superclass reference can not be aimed at a subclass object
a. False
4. Abstract classes is used only as abstract superclasses for concrete subclasses and to
declare reference variables
5. instanceof Determines whether an object is an
instance of a certain type
6. getClass method returns name of class
a. FALSE
7. final methods: Can be overridden in a subclass;
a. FAlse
8. Interfaces is used typically when disparate classes need to share common methods and
constants;
a. TRUE
9. A class can implement only one interface
a. FAlse
10. Interfaces can be used to declare constants used in many class declarations
a. TRUE
11.