ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Software >> Microsoft-Related >> Dot-Net >> Dot-Net-General
 
 
 
Question
1.What is the major advantage of polymorphism? Please don't
simply say binding. Specify any other reason.
 Question Submitted By :: Srikanth
I also faced this Question!!     Rank Answer Posted By  
 
Answer
the main reason to use polymorphism is generalization, as 
you can see in case of overloading. say if i have add 
function which just add two intergers. and i have one more 
similar kind of functionality then in that case i will do 
the overloading as only my internal implemantation will 
vary.

second thing is consistency in code.

and in case of overriding main advantage is you can invoke 
child class function dynamically(means by creating the 
object of base class as normally we do). 

suppose one of my function expects my base class type 
object and i want functionality of overrided function then 
in that case i can simply write (parent obj = new child();)
 
0
Ashutosh
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com