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


Please Help Members By Posting Answers For Below Questions

When should you make a function static?

544


What is externalizable?

620


What is the purpose of the enableevents() method in java programming?

588


How many characters is 2 bytes?

532


Can I override protected method in java?

596






Which collection is ordered in java?

533


What is the difference between I ++ and ++ I in java?

507


Give a brief description of java socket programming?

527


What do you mean by inner class in java? Explain

588


How does callback work in java?

607


Explain about fail safe iterators in java?

568


What do you mean by checked exceptions?

538


What is the exact difference in between Unicast and Multicast object? Where will it be used?

584


What languages are pass by reference?

538


Are floats faster than doubles?

566