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...

what is polymorphism with example?types of polymorphism?

Answer Posted / hassan arafat

Polymorphism allows an entity (for example, variable,
function or object) to take a variety of representations.

Ad-hoc polymorphism: This polymorphism let a function to
have different implementations based on its parameters and
return type. Ad-hoc polymorphism is supported through
function and method overloading.
Parametric polymorphism: lets you write a piece of code
that is not associated with a particular type and therefore
can be used with any type. Object oriented languages like
C# achieve it through generics.
Inclusion polymorphism: let a type hold instances of many
different types as long as the types are related by some
common parent class. Object oriented languages like C#
achieve inclusion polymorphism through inheritance.

Is This Answer Correct ?    33 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is garbage collector?

1082


Can a class be declared as static?

1171


How many classes can any class inherit java?

970


Does substring create a new object?

997


State the difference between creating string as new () and literal.

1118


Explain Basics of OOP Language in java

1060


Is there any difference between synchronized methods and synchronized statements?

1098


What is main difference between variable and constant?

1036


Can a class extend 2 classes in java?

1036


How many inner classes can a class have?

1045


How are this() and super() used with constructors in java programming?

1063


Can you override private or static method in java?

976


EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.

9210


How many arguments can be passed to main ()?

995


What is struts in java?

1039