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 the difference between Array and Hash Table?

1022


What is the main use of generics in java?

983


what is thread in Java ?

1153


What is set string?

1168


What is the purpose of static methods and static variables?

1067


How do you create a sop?

993


When can we say that threads are not lightweight process in java?

1157


Name the components that are termed to be Heavy-weight component but available in Light-weight components?

2491


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

1049


What is the integer of 16?

962


Why is the singleton pattern considered to be an anti pattern?

881


what is a green thread? : Java thread

1017


What is jvm? Why is java called the platform independent programming language?

1014


Can we make constructors static?

1225


What are the benefits of immutable objects?

997