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
Is void a data type in java?
What is a function argument in java?
Is string serializable in java?
What is jvm? Why is java called the platform independent programming language?
What is the main use of generics in java?
Is string a data type in java?
Is java an ide?
Explain the difference between collection api and stream api in java8?
Explain the importance of finalize() method.
What is fundamental datatype?
Give the hierarchy of inputstream and outputstream classes.
What is java util concurrentmodificationexception?
Explain Basics of OOP Language in java
If a class is declared without any access modifiers, where may the class be accessed in java programming?
What do you mean by jjs in java8?