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
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
How do you check if a string is lexicographically in java?
What are the different types of inheritance in java?
What is the function of character?
What access modifiers can be used for methods?
What are the types of literals?
What is a treeset class?
What is double word?
What is computer compiler?
What is codebase?
Have you ever used hashtable and dictionary?
Is minecraft 1.15 out?
What is the use of hashmap in java?
Explain tree set and its features?
how we can create packages in java?