No. |
Static Binding (Early) |
Dynamic Binding(Late) |
1)
|
It is a binding that happens at compile time. | It is a binding that happens at run time. |
2)
|
Actual object is not used for binding.
|
Actual object is used for binding.
|
3)
|
It is also called early binding because binding happens during compilation. |
It is also called late binding because binding happens at run time.
|
4)
|
Method overloading is the best example of static binding.
|
Method overriding is the best example of dynamic binding.
|
5)
|
Private, static and final methods show static binding. Because, they can not be overridden.
|
Other than private, static and final methods show dynamic binding. Because, they can be overridden.
|
Example of static binding
Example of dynamic binding
| |
0 comments:
Post a Comment