Exam 9: Inheritance
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures40 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the ArrayList Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File I/O40 Questions
Exam 11: GUI Applications–Part 140 Questions
Exam 12: GUI Applications–Part 240 Questions
Exam 13: Applets and More40 Questions
Exam 14: Creating GUI Applications with JavaFX40 Questions
Exam 15: Recursion20 Questions
Exam 16: Databases40 Questions
Select questions type
This shows the inheritance relationships among classes in a manner that is similar to a family tree.
Free
(Multiple Choice)
4.7/5
(38)
Correct Answer:
D
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.
Free
(Multiple Choice)
4.7/5
(42)
Correct Answer:
C
If a subclass constructor does not explicitly call a superclass constructor,
(Multiple Choice)
4.7/5
(39)
When a class contains an abstract method, you cannot create an instance of the class.
(True/False)
4.8/5
(38)
In an inheritance relationship, the subclass constructor always executes before the superclass constructor.
(True/False)
4.9/5
(42)
In the following statement, which is the superclass?
Public class ClassA extends ClassB implements ClassC
(Multiple Choice)
4.7/5
(37)
When a class does not use the extends key word to inherit from another class, Java automatically extends it from the ________ class.
(Multiple Choice)
4.8/5
(33)
When a class implements an interface, an inheritance relationship known as ________ is established.
(Multiple Choice)
4.9/5
(41)
Because every class directly or indirectly inherits from the Object class, every class inherits the Object class's members.
(True/False)
4.8/5
(31)
Because the subclass is more specialized than the superclass, it is sometimes necessary for the subclass to replace inadequate superclass methods with more suitable ones.
(True/False)
5.0/5
(36)
If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method.
(True/False)
4.9/5
(38)
Protected class members can be denoted in a UML diagram with the ________ symbol.
(Multiple Choice)
4.9/5
(32)
A(n) ________ is a method that appears in a superclass, but expects to be overridden in a subclass.
(Multiple Choice)
4.7/5
(32)
In the following statement, which is the interface?
Public class ClassA extends ClassB implements ClassC
(Multiple Choice)
4.8/5
(44)
When a subclass overrides a superclass method, only the subclass's version of the method can be called with a subclass object.
(True/False)
5.0/5
(37)
In the following statement, which is the subclass?
Public class ClassA extends ClassB implements ClassC
(Multiple Choice)
4.9/5
(31)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)