GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  OOPS

 Print  |  
Question:   What is Polymorphism?



August 08, 2008 11:31:10 #3
 whenkeys   Member Since: August 2008    Total Comments: 4 

RE: What is Polymorphism?
 
Poly [many] morph [form] as the name says many forms is supported. Two types of Polymorphism are operator overloading and function overloading.
operator overloading => +operator can be implemented to add numbers or string or even if one wishes to subtract [only for this class of course].
function overloading  => tryOverload(int a, int b) and also have tryOverload(). If you pass no parameter the second method is invoked if u pass two integer parameter you would invoke first method.
     

 

Back To Question