Exam 10: Inheritance
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
All methods in an abstract class must also be declared abstract.
Free
(True/False)
4.8/5
(43)
Correct Answer:
False
What type of relationship exists between two objects when one object is a specialized version of another object?
Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
A
In the following code, what will the call to super do? public class ClassB extends ClassA
{
Public ClassB()
{
Super(40);
System.out.println("This is the last statement "+
"in the constructor.");
}
}
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
C
If ClassC is derived from ClassB which is derived from ClassA, this would be an example of
(Multiple Choice)
4.8/5
(43)
A class becomes abstract when you place the __________ key word in the class definition.
(Multiple Choice)
4.9/5
(39)
Given the following code, which statement is true? public class ClassB implements ClassA{ }
(Multiple Choice)
4.8/5
(38)
A functional interface is simply an interface that has one abstract method.
(True/False)
4.7/5
(41)
When a method is declared with the __________ modifier, it cannot be overridden in a subclass.
(Multiple Choice)
5.0/5
(41)
In __________, inheritance is shown with a line that has an open arrowhead at one end that points to the superclass.
(Multiple Choice)
4.9/5
(38)
When an "is a" relationship exists between objects, the specialized object has __________.
(Multiple Choice)
4.8/5
(40)
__________ is a special type of expression used to create an object that implements a functional interface.
(Multiple Choice)
4.8/5
(40)
In the following statement, which is the subclass? public class ClassA extends ClassB implements ClassC
(Multiple Choice)
5.0/5
(35)
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)
4.9/5
(44)
A protected member of a class may be directly accessed by __________.
(Multiple Choice)
4.8/5
(33)
Inheritance involves a subclass, which is the general class, and a superclass, which is the specialized class.
(True/False)
4.9/5
(37)
Which of the following is the operator used to determine whether an object is an instance of a particular class?
(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 64
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)