Difference between Polymorphism and Dynamic Method lookup
chetan shetty
Greenhorn
Joined: Dec 07, 2005
Posts: 2
posted
0
Hi all,
Can somebody throw light as to whether polymorphism and dynamic method lookup are different or the same?
As polymorphism allows a reference to denote objects of different types at different type during runtime. How then is dynamic method lookup similar or different?
I am pretty confused on the terminologies used here.
To quote the polymorphism chapter of Bruce Eckel's Thinking in Java: "...polymorphism (also called dynamic binding or late binding or run-time binding)..."
(This question isn't really about threads and synchronization, so don't be surprised of one of the forum moderators moves this to a "Java in General" forum. )
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Ernest Friedman-Hill
author and iconoclast
Marshal
Thank you for the input. It should definitely help. And yes, i did realise that i had posted my query in the incorrect context after i had posted my query. Oversight on my part.
Thanks once again. Chetan
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Note that some people use the term "polymorphism" for a much more general concept - sometimes method overloading is also called "compile time polymorphism", for example. In that sense, dynamic method lookup is a specific form of (runtime) polymorphism.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Difference between Polymorphism and Dynamic Method lookup