Polymorphism means taking many forms, where ‘poly’ means many and ‘morph’ means forms. It is the ability to allows us to perform a single action in different ways. Polymorphism in Java is of two types:
- Compile time polymorphism( or Static Polymorphism)
- Run time polymorphism (or Dynamic Polymorphism)
- Method overloading (Compile time polymorphism)
- Method overriding (Runtime polymorphism)