Objects are polymorphic.
An object can take many forms.
This is known as polymorphism.
And this lesson, your objects will take many forms.
Inheritance allows an object to take many forms, in other words, inheritance allows an object to be
polymorphic.
Here we're creating an object of the person class, but remember that our class by default inherits
from the object class.
So we can declare this as type object.
If you run the debugger.
We're still using the person constructor to create the object.
But ultimately, our personal object is of type object, that's it, and that's polymorphism.
Polymorphism means an object can take many forms.
It can take its own form.
Or it can take the form of the class that inherits from.