Polymorphism means β€œmany forms” - the ability of an object to take on multiple forms depending on the context. In Java, it allows one interface or superclass to be used with different implementations.

Types of Polymorphism

TypeAlso Known as
Compile-TimeMethod Overloading
RuntimeMethod Overriding

Why It Matters

  • Enables flexible and scalable code.
  • Promotes use of interfaces and abstract classes.
  • Powers design patterns, dependency injection, etc.

Tip

If you’re calling the same method on different types and getting different behavior - that’s polymorphism.
For runtime polymorphism, think method overriding + dynamic method dispatch.


Parent: _OOP Concepts