Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are static methods?

1042


Why are the methods of the math class static?

1068


Can we define private and protected modifiers for the members in interfaces?

1090


Can list be null in java?

1030


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1236


What is the difference between yielding and sleeping?

1102


How do you declare a string variable?

1016


What is dynamic array in java?

1021


Can a static method be overridden in java?

1013


What does  mean in regex?

1050


What is the difference between import java.util.date and java .util?

1052


What is a instance variable?

1054


What is java volatile?

1039


How is abstraction implemented in java ?

992


Which is better list or arraylist in java?

868