Polymorphism in Java
Polymorphism in Java - Important Points
21. | Which of the following is a benefit of polymorphism in Java? |
---|
A. Code reusability
B. Improved performance
C. Strong typing
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
22. | Which of the following is an example of dynamic polymorphism? |
---|
A. Method overloading
B. Method overriding
C. Operator overloading
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
23. | Which keyword is used to implement method overriding in Java? |
---|
A. super
B. this
C. override
D. None of the above
View Answer Discuss Work SpaceAnswer: option c
Explanation:
24. | Which of the following is an example of a compile-time polymorphism? |
---|
A. Method overloading
B. Method overriding
C. Operator overloading
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
25. | Which of the following is true about static methods and polymorphism? |
---|
A. Static methods can be overridden in Java
B. Static methods can be overloaded in Java
C. Static methods can participate in polymorphism in Java
D. None of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation: