what is real-time example of runtime polymorphism and
compile time polymorphism
Answer Posted / 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 |
Post New Answer View All Answers
What are the default and parameterized constructors?
Explain about collection interface in java?
What loop means?
What is data structure in java?
Does google use java?
What is class and its types?
Is null a string in java?
What are advantages and disadvantages of OOPs?
Why do we need array in java?
Is null an object java?
What are the features of junit?
What is singleton math?
What is json parser in java?
What are the actions that can occur when a thread enters blocked state?
If system.exit (0); is written at the end of the try block, will the finally block still execute?