Polymorphism isimportant features of object-oriented programming (OOP’s) and we can define itas "Polymorphism means one namemultiple forms". Or we use same name for different methods by passingdifferent parameters by varying data types, then this process is called polymorphism.
Important points on polymorphism
• Poly means many and morph means form. Thus, polymorphismrefers to being able to use many forms of a type without regard to the details.
• Polymorphism is the characteristic of being able to assigna different meaning specifically, to allow an entity such as a variable, afunction, or an object to have more than one form
• Polymorphism is the ability to process objects differentlydepending on their data types
• Polymorphism is the ability to redefine methods forderived classes.
Types of Polymorphism
• Compile time Polymorphism
Compile time Polymorphism also known as method overloading.Method overloading means having two or more methods with the same name but withdifferent signatures.
• Run time Polymorphism
Run time Polymorphism also known as method overriding. Methodoverriding means having two or more methods with the same name, same signaturebut with different implementation