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 is array and arraylist in java?
What is overloading and overriding in java?
How is java created?
How variables are stored in memory?
What is difference between hashset and hashmap in java?
What is core java called?
What is formatted output in java?
How do you delete a list in java?
Which package has light weight components in java programming?
Explain some best practices you would apply while using collection in java?
What are meta-annotations?
What is the escape character in java?
What is keyword in oop?
How many tetrahedral voids are there in bcc?
Can private members of a base class are inheritable justify?