Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Polymorphism and Dynamic Method lookup

 
chetan shetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
Chetan
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chetan,

Welcome to JavaRanch!

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. )
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed. Let's move this to Java in General (Beginner).
 
chetan shetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marc,

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
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic