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

What is covariant return type?

1072


How do you check if an arraylist is not empty?

1065


There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?

1439


How can you add and remove nodes in jtree?

983


What string is utf8?

930


Explain about abstract classes in java?

991


Which sorting algorithm is best in java?

945


What is an empty class? What functionality does it offer in Java?

1213


What is array length?

937


Can a variable be local and static at the same time?

951


What is a website container?

905


What will happen if a thrown exception is not handled?

963


What is a flag value?

963


What are keywords in java?

963


Where import statement is used in a java program?

1091