|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Runtime polymorphism Vs Compile time polymorphism Hello Friends, I want to discuss my confusion with you and which is related to 'Polymorphism'. As per my knowledge the 'Polymorphism' divided into run-time polymorphism and compile time polymorphism. But thing is that I am not able to understand the difference in between these two type of polymorphism. I wonder if anyone provides me some differences between Runtime polymorphism and Compile time polymorphism. |
#2
| |||
| |||
Re: Runtime polymorphism Vs Compile time polymorphism Runtime polymorphism is achieved only when the class that executes the class method at runtime. The polymorphism is the ability to take several forms. In the case of polymorphism ad-hoc applied to the legacy he can be able to write in Java Animal a = new Dog (). In other words, to see a specific object of a generic point of view.The polymorphism is the mechanism in which the same message can be interpreted in different ways function of the object that receives this message. |
#3
| |||
| |||
Re: Runtime polymorphism Vs Compile time polymorphism In Compile time polymorphism the function call is resolved only at compile time.The term polymorphism means that the polymorphism in behavior, that is to say, can trigger the different methods in response to a single message. Each derived class inherits the specification of methods of its base classes, but also the ability to locally modify the behavior of these methods to better take into account the peculiarities of each. This is the principle of redefining methods. |
#4
| |||
| |||
Re: Runtime polymorphism Vs Compile time polymorphism The polymorphism is a dynamic linking. Thus the call to a method defined in the super class and the subclass will not be fixed at compile time. Runtime polymorphism occurs only in the inheritance of one class by redefinition of the method with a method. Everything we do is a copy of the members of a derived class to its base class. polymorphism is the ability of an entity to have multiple forms. In this computer term applies also to objects and methods according to their degree of adaptability. |
#5
| |||
| |||
Re: Runtime polymorphism Vs Compile time polymorphism If we implement the polymorphism in our program, the internal structure becomes more complex . Also, the access method requires two indirections, which provided the extension of time to answer.The compile time polymorphism is related while the compilation of the program. The polymorphism means that the polymorphism in behavior, that is to say, can trigger the different methods in response to a single message. Each derived class inherits the specification of methods of its base classes, but also the ability to locally modify the behavior of these methods to better take into account the peculiarities of each. |
![]() |
|
Tags: compile time polymorphism, difference, polymorphism, run time polymorphism, runtime polymorphism, runtime vs compiletime |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference between Compile time and runtime in C language | Otta-koothan | Software Development | 6 | 22-08-2011 01:20 PM |
What does polymorphism mean in OOP? | Khan Baba | Software Development | 5 | 06-02-2010 02:14 PM |
Polymorphism VS Inheritance | Taylor D | Software Development | 5 | 22-01-2010 10:12 AM |
Polymorphism in SQL database | cobra2008 | Software Development | 2 | 04-04-2009 09:52 PM |
Run - Time polymorphism with Overriden method in JAVA | NAYASA | Software Development | 1 | 04-12-2008 07:11 PM |