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
When should you make a function static?
What is externalizable?
What is the purpose of the enableevents() method in java programming?
How many characters is 2 bytes?
Can I override protected method in java?
Which collection is ordered in java?
What is the difference between I ++ and ++ I in java?
Give a brief description of java socket programming?
What do you mean by inner class in java? Explain
How does callback work in java?
Explain about fail safe iterators in java?
What do you mean by checked exceptions?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
What languages are pass by reference?
Are floats faster than doubles?