What is polymorphism?
Explain Briefly.
Polymorphism is a concept in object-oriented programming that allows objects of different classes to be treated as objects of a common superclass. It enables flexibility in method implementation and fosters code reusability.
Polymorphism means “many forms“, and it occurs when we have many classes that are related to each other by inheritance. Like we specified in the previous chapter; Inheritance lets us inherit attributes and methods from another class. Polymorphism uses those methods to perform different tasks.
Polymorphism means “many forms“, and it occurs when we have many classes that are related to each other by inheritance. Like we specified in the previous chapter; Inheritance lets us inherit attributes and methods from another class. Polymorphism uses those methods to perform different tasks.
- 14 Forums
- 1,835 Topics
- 5,051 Posts
- 0 Online
- 1,078 Members