Exam 9: Inheritance
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
Consider the following code snippet:
Which of the following statements is correct?

(Multiple Choice)
5.0/5
(37)
Suppose the abstract class Message is defined below
A concrete subclass of Message, called FrenchMessage, is defined.Which methods must FrenchMessage define?

(Multiple Choice)
4.8/5
(28)
What reserved word in a method definition ensures that subclasses cannot override the method?
(Multiple Choice)
4.9/5
(38)
Consider the following code snippet:
What is wrong with this code?

(Multiple Choice)
4.9/5
(41)
Consider the following code snippet:
What does this code do?

(Multiple Choice)
4.9/5
(33)
Consider the hierarchy of classes shown below.
What is the superclass of the class TelevisionShow?

(Multiple Choice)
5.0/5
(42)
You are creating a class inheritance hierarchy about motor vehicles that will contain classes named Vehicle, Auto, and Motorcycle.Which of the following statements is correct?
(Multiple Choice)
4.9/5
(28)
Consider the following code snippet:
If the Programmer class inherits from the Employee class, and only the Employee class has an implementation of the increaseSalary method, which statement is correct?

(Multiple Choice)
4.9/5
(37)
Consider the following code snippet:
Assume that the Programmer class inherits from the Employee class, and only the Employee class has an implementation of the toString() method.Which of the following statements is correct?

(Multiple Choice)
4.8/5
(36)
What reserved word in a class definition ensures that subclasses cannot be created from the class?
(Multiple Choice)
4.8/5
(31)
Consider the following class hierarchy:
Which of the following code fragments is NOT valid in Java?

(Multiple Choice)
4.8/5
(42)
Consider the following code snippet:
What is wrong with this code?
A)The return statement should use the == operator instead of the equals method.
B)The parameter in the equals method should be declared as Coin otherCoin.
C)otherCoin must be cast as a Coin object before using the equals method.
D)There is nothing wrong with this code.

(Not Answered)
This question doesn't have any answer yet
What is the term used for a subclass that defines a method with the same name as a method in its superclass, but with different parameter types?
(Multiple Choice)
4.8/5
(42)
Consider the following code snippet:
Which of the following statements is true?

(Multiple Choice)
4.9/5
(36)
Why is the following code, which assumes ChoiceQuestion is a subclass of Question, considered poor strategy?

(Multiple Choice)
4.9/5
(42)
Showing 21 - 40 of 99
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)