Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

Why Dynamic Method Dispatch is called Dynamic Polymorphism?  RSS feed

 
midhuna peru
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Report post to moderator

Hi guys!
I want to know why Dynamic Method Dispatch is called Dynamic Polymorphism and why overloading is called static polymorphism?
I know both the concepts but why one is static and the other is dynamic?
what i see is it is related to Staic and Dynamic binding which again i din't get.
Static Binding is compile time, the other is run time...I din't get this.

Say class A has display() method, then
A ref1=new A();
ref1.display();

why is this static binding? what is dynamic binding then?

Examples please....
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!