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 not object oriented programming?
Why singleton class is used in java?
Can we overload destructor in java?
What is bool mean?
What happens to the Exception object after handling an exception?
Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What is meant by class loader? How many types are there?
How to disable caching on back button of the browser?
Can you use abstract and final both with a method?
What is arraylist e?
Why are functions called methods in java?
Is there any difference between synchronized methods and synchronized statements?
Why do we use threads in java?
Java is Pass by Value or Pass by Reference?