18. If a class is declared as final, the incorrect statement is (). A. Indicates that this class is final B. Indicates that this class is a root class C. Methods in this class cannot be overridden D. Variables in this class cannot be hidden 19. In the following description of polymorphism, the incorrect one is ( ). A. Polymorphism refers to "one definition, multiple implementations" B. There are three types of polymorphism: dynamic polymorphism, static polymorphism, and default polymorphism C. Polymorphism is not used to speed up code D. Polymorphism is one of the core characteristics of OOP 20. In Java, two interfaces B and C have been defined. To define a class that implements these two interfaces, the correct statement is (). A. interface A extends B,C B. interface A implements B,C C. class A implements B,C D. class A extends B,C 21. Given the following java code, the correct description of the usage of "super" is (). class Student extends Person{ public Student() { super(): } 3

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 22SA
icon
Related questions
Question
18. If a class is declared as final, the incorrect statement is ().
A. Indicates that this class is final
B. Indicates that this class is a root class
C. Methods in this class cannot be overridden
D. Variables in this class cannot be hidden
19. In the following description of polymorphism, the incorrect one is ().
A. Polymorphism refers to "one definition, multiple implementations"
B. There are three types of polymorphism: dynamic polymorphism, static
polymorphism, and default polymorphism
C. Polymorphism is not used to speed up code
D. Polymorphism is one of the core characteristics of OOP
20. In Java, two interfaces B and C have been defined. To define a class that
implements these two interfaces, the correct statement is ( ).
A. interface A extends B,C
B. interface A implements B,C
C. class A implements B,C
D. class A extends B,C
21. Given the following java code, the correct description of the usage of "super"
is ().
class Student extends Person{
public Student() {
super();
}
3
D
A. Used to call the super () method defined in the Person class
B. Used to call the super () method defined in the Student class
C. The parameterless construction method used to call the Person class
D. Used to call the first constructor of the Person class
22. The purpose of using anonymous classes or methods is ( ).
A. Improve the running speed of program code
B. Improve the security strength of program code
C. Improve the reusability of program code
D. Simplify program code
Transcribed Image Text:18. If a class is declared as final, the incorrect statement is (). A. Indicates that this class is final B. Indicates that this class is a root class C. Methods in this class cannot be overridden D. Variables in this class cannot be hidden 19. In the following description of polymorphism, the incorrect one is (). A. Polymorphism refers to "one definition, multiple implementations" B. There are three types of polymorphism: dynamic polymorphism, static polymorphism, and default polymorphism C. Polymorphism is not used to speed up code D. Polymorphism is one of the core characteristics of OOP 20. In Java, two interfaces B and C have been defined. To define a class that implements these two interfaces, the correct statement is ( ). A. interface A extends B,C B. interface A implements B,C C. class A implements B,C D. class A extends B,C 21. Given the following java code, the correct description of the usage of "super" is (). class Student extends Person{ public Student() { super(); } 3 D A. Used to call the super () method defined in the Person class B. Used to call the super () method defined in the Student class C. The parameterless construction method used to call the Person class D. Used to call the first constructor of the Person class 22. The purpose of using anonymous classes or methods is ( ). A. Improve the running speed of program code B. Improve the security strength of program code C. Improve the reusability of program code D. Simplify program code
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning