what is real-time example of runtime polymorphism and
compile time polymorphism
Answers were Sorted based on User's Feedback
Answer / rushugroup
Run time polymorphism: Bank Account, savings and current
(here, acoount class is the base class, savings and current
account are derived classes, the objects of each are created
at runtime)
Compile time polymorphism: 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 ? | 111 Yes | 10 No |
Answer / shaadaa
GUI Builder Application's Toolbox can be taken as example of runtime polymorphism. we do not know until runtime which tool is going to be selected by user.
| Is This Answer Correct ? | 1 Yes | 9 No |
Answer / 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 |
Can a lock be acquired on a class in java programming?
difference between java ,c#&java,c++
What do you meant by active and passive objects?
Is java 9 released?
when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).
What are the differences between path and classpath variables?
What is the difference between a factory and abstract factory pattern?
How do generics work in java?
What purpose do the keywords final, finally, and finalize fulfill?
What is java command?
Is arraylist dynamic in java?
what is Inheritense