Xpode.com        Click here to Print this article.

Polymorphism

The word ‘Polymorphism’ has been made by using two Greek words- ‘Poly’ and ‘Morphism’. ‘Poly’ means many and ‘Morphism’ means forms. Thus ‘Polymorphism’ means one name multiple forms. In it we can use the same thing for different purposes.

Polymorphism is of two types:-

Polymorphism Image

Polymorphism means to use one thing for multiple purposes. When this decision is taken during compilation time, that the thing will be used for what purpose, the process is called ‘Compile Time Polymorphism’ or ‘Early Binding’. But when this decision is taken during run time, the process is called ‘Run Time Polymorphism’ or ‘Late Binding’.

Compile time polymorphism is achieved using function overloading and operator overloading. Whereas run time polymorphism is achieved using virtual functions.



http://
http://

Contributed by:
Rohit kakria
I am software developer, moderator of xpode.com

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=96

Click here to go on website