what is real-time example of runtime polymorphism and
compile time polymorphism

Answers were Sorted based on User's Feedback



what is real-time example of runtime polymorphism and compile time polymorphism..

Answer / 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

what is real-time example of runtime polymorphism and compile time polymorphism..

Answer / shaadaa

GUI Builder Application's Toolbox can be taken as example of runtime polymorphism. we do not know until runtime which tool is going to be selected by user.

Is This Answer Correct ?    1 Yes 9 No

what is real-time example of runtime polymorphism and compile time polymorphism..

Answer / jyoti

yes

Is This Answer Correct ?    8 Yes 18 No

what is real-time example of runtime polymorphism and compile time polymorphism..

Answer / harish kumar

Run time polymorphism : function and Operator overloading is
a runtime polymarphism. Example:- Bank Account, savings and
current(here, account class is the base class, savings and
current account are derived classes, the objects of each are
created at run time)

compiler time polymorphism : virtual function is a compiler
time polymorphism. Example:- 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 ?    11 Yes 55 No

Post New Answer

More Core Java Interview Questions

what is bmg file and how to create that files?what will it contailn?

0 Answers   HCL, Probe Services,


what is jdk1.5 features?

6 Answers   AMS, Virtusa,


what is the J2EE BluPrints?

0 Answers  


How many threads can java run?

0 Answers  


How do you do absolute value in java?

0 Answers  






explain about jre and jvm

2 Answers  


How do you initialize an arraylist in java?

0 Answers  


What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

1 Answers  


What is a local block?

0 Answers   Global Logic,


What is unicode in java?

0 Answers  


What is keyword in oop?

0 Answers  


Where we write javascript code in html page?

0 Answers  


Categories