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
What is size of int in java?
What is dynamic array in java?
what is the significance of listiterator in java?
What is a nested structure?
What are JVM.JRE, J2EE, JNI?
Is there any tag in htm to upload and download files?
How to display all the prime numbers between 1 and 100
What is difference between java and java ee?
Difference between static binding and dynamic binding?
What is join () in java?
What are the six ways to use this keyword?
How does arraylist work in java?
What does system.gc() and runtime.gc() methods do?
What is the advantage of OOP in java?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?