Polymorphism in Java
Polymorphism in Java - Important Points
16. | Which of the following is an example of a superclass? |
---|
A. Dog
B. Animal
C. Mammal
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
17. | Which of the following is an example of a subclass? |
---|
A. Dog
B. Animal
C. Mammal
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
18. | Which of the following is an example of method hiding? |
---|
A. public void print() {}
B. public static void print() {}
C. public final void print() {}
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
19. | Which of the following is true about polymorphism and inheritance? |
---|
A. Polymorphism and inheritance are two different concepts in Java
B. Polymorphism and inheritance are closely related concepts in Java
C. Polymorphism is a subtype of inheritance in Java
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
20. | Which of the following is an example of an abstract class? |
---|
A. Animal
B. Dog
C. Mammal
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation: