| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0 Thanked 5 Times in 5 Posts Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5
|
compile-time polymorphism AND run-time polymorphism
DIFFERENCE BETWEEN compile-time polymorphism AND run-time polymorphism?
Please anybody explain it? |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: compile-time polymorphism AND run-time polymorphism
Similar posts...
run time polymorphism Can anyone tell me the main difference? http://forums.sureshkumar.net/java-c...ymorphism.html What is polymorphism ? Thanks, Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
|
|
#3 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: compile-time polymorphism AND run-time polymorphism
Compile-time Example - Function Overloading
Run-time Example - Function Overriding, Interfaces.
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
| The Following User Says Thank You to sk_kireeti For This Useful Post: |
t_mohan (01-02-07)
|
|
|
#4 (permalink) |
|
Member
Join Date: Jan 2007
Posts: 32
Thanks: 3 Thanked 3 Times in 3 Posts Thanks: 3
Thanked 3 Times in 3 Posts
Rep Power: 2
|
Re: compile-time polymorphism AND run-time polymorphism
I agree with kireeti,
I would like to add some spice to so that we can have good idea on these concepts. We will go for the Compile time overloading when there is specific set of implementation we know earlier. For example take an area calculation we can do it by using either Integer primitive data type, or Float data type or Double data type. We will go for the Runtime polymorphism if we are having different set of implementations it self suppose if we can take the same area calculation at different shape level we are having shapes like triagle, rectangle ,etc. Each one has it's own implementation of area calculation so we will know the which component method will be included at the run time only.
__________________
Cheers, Laxmi |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|