True / False
1. Classes from which objects can be instantiated are called constant classes.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 538
2. If you create an empty method within an abstract class, the method is abstract even if you do not explicitly use the keyword abstract.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 539
3. When you create a superclass and one or more subclasses, each object of each subclass is a subclass object.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 547
4. When you create a class that uses an interface, you include the keyword extends.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 566
5. Abstract classes and interfaces are similar in that you cannot instantiate concrete objects from either one.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 569
6. The java.lang package contains fundamental classes and is imported automatically each time a program is written.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 574
7. It is common to create an interface when you want a class to implement behavior from more than one parent.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 570
8. A class that will be placed in a nondefault package for others to use must be private.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 575
9. While a class can inherit from multiple abstract superclasses, it implement only one interface.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 569
10. Java does not allow a class to inherit directly from two or more parents.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 566
Multiple Choice
11. A(n) ____ class is a class that you create only to extend from.
a. abstract b. inheritance
c. parent d. final
ANSWER: a
POINTS: 1
REFERENCES: 538
12. If you attempt to instantiate an object from an abstract class, you receive an error message from the compiler that you have committed a(n) ____.
a. LogicError b. InstantiationError
c. SyntaxError d. ObjectError
ANSWER: b
POINTS: 1
REFERENCES: 538
Reviews
There are no reviews yet.