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 real-time example of runtime polymorphism and
compile time polymorphism

Answer Posted / harish kumar

Run time polymorphism : function and Operator overloading is
a runtime polymarphism. Example:- Bank Account, savings and
current(here, account class is the base class, savings and
current account are derived classes, the objects of each are
created at run time)

compiler time polymorphism : virtual function is a compiler
time polymorphism. Example:- calculating area of square and
rectangle (different classes, square and rectangle have a
function called area() which takes different arguments (for
square only one argument and for rectangle two arguments-) )

Is This Answer Correct ?    11 Yes 55 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give the hierarchy of inputstream and outputstream classes.

1047


Can we overload final method in java?

928


Why destructor is not used in java?

925


How does singleton class work?

925


What is double data type?

889


What is bufferedwriter?

915


Convert Binary tree to linked list.

1010


Why arraylist is not synchronized in java example?

968


Write a program in java to create a doubly linked list containing n nodes.

906


What are nested classes in java?

1036


What is procedure writing?

899


Implement two stacks using a single array.

998


Can we use String with switch case?

1107


Explain the difference between private, public, package and protected in java?

990


What is java regex?

939