Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 03-02-2010
Member
 
Join Date: Dec 2009
Posts: 32
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.
Reply With Quote
  #2  
Old 03-02-2010
Member
 
Join Date: May 2008
Posts: 2,383
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.
Reply With Quote
  #3  
Old 03-02-2010
Member
 
Join Date: May 2008
Posts: 2,008
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.
Reply With Quote
  #4  
Old 03-02-2010
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
  #5  
Old 03-02-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Runtime polymorphism Vs Compile time polymorphism"
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


All times are GMT +5.5. The time now is 04:11 PM.