What is Polymorphism. Explain ?

Showing Answers 1 - 3 of 3 Answers

Prasannakumar

  • Apr 13th, 2005
 

Polymorphism is a object oriented concept which enables an object in two or more forms.  
 
There are 2 types of polymorphism 
1.compile time 2.run time 
Compile time : The compiler decides that it can invoke a form of an object ar compile time. 
 
Example In function overloading , the compiler decides which method to be invoked in complie time itself. 
 
Run Time: The complier comes to know about the object to be invoked in run time. 
 
Pure virtual functions. 
Based on the type of object the function which are overriden in child classes are invoked. Only the runtime decides what is the type of the object. 
 
 

  Was this answer useful?  Yes

dhamo

  • Oct 10th, 2007
 

Polymorphism : Its a object oriented  concept (defined in design phase)

Polymorphism concept of using operators & functions  in different ways depending on  what they are  operating on.


Operators overloading : Using operators in differentways depending upon what they are operating on is called Operator over loading

Function overloading : Using function in different ways is called function overloading.


Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions