Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

1.What is the major advantage of polymorphism? Please don't
simply say binding. Specify any other reason.

Answer Posted / ashutosh

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();)

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of transactions are there in com + .net ?

1075


Please explain what is immutability, what is it for and how is it codified?

1011


What is .net latest version?

1045


Tell us what is a variable of implicit type and what is its scope?

1023


Usually in .net, the clr takes care of memory management. Is there any need for a programmer to explicitly release memory and resources? If yes, why and how?

1104


Different between .net & j2ee ?

1100


How can I tell if .net 3.5 is installed?

952


What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?

972


How will you do redo and undo in textbox control?

1065


How many design patterns can be created in .net?

1020


Do you know what is the difference between an abstract class and an interface?

1022


How server form post-back works?

1089


Show different types of collection in .NET?

1017


What is garbage collection? Explain the difference between garbage collections in .net 4.0 and earlier versions?

1099


What are an object and a class?

1112