Polymorphism
Polymorphism is a word which is created by a combination of two word Poly and morphism means that a thing which is created by one or more thingIn the polymorphism we create a one object and associated with many name which name is same
means that
Polymorphism means one object behaving as multiple forms. One function behaves in different forms. In other words, Many forms of a single object is called Polymorphism.
there are two type of polymorphism
1. Compile time poly morphism that is also known as function overloading or operator overloading
or 2. Run time polymorphism that is also known as virtual function
in function or operator overloding we create on object and associated with same name function
and in virtual function we must override the function
No comments:
Post a Comment