interface Shape { area(); perimeter(); }
Click any shape — it's the exact same call shape.area(), yet each shape runs its own version.
shapes
0
one interface · many forms
add a new type → it just works, no caller changes
▸
One call site, shape.area(), dispatches to whichever shape you clicked — the caller never checks the type. That's polymorphism (dynamic dispatch).