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 the use of java?
What are the types of literals?
What is meant by string is immutable?
Describe the Big-O Notation.
What is the syntax and characteristics of a lambda expression?
Which variables are stored in heap?
What is a dynamic array java?
Can you declare the main method as final?
What will happen to the exception object after exception handling?
How does hashset work in java?
Name and explain the types of ways which are used to pass arguments in any function in java.
Explain methods specific to list interface?
Why for each loop is used?
Can keyword be used as identifier?
How do you implement singleton class?