Difference Between Static and Dynamic Binding


In this post, we will understand the difference between static binding and dynamic binding.

Static Binding

  • It is resolved at compile time.

  • It uses type of the class and fields.

  • It uses private, final, and static methods and variables.

  • Example: Overloading

Dynamic Binding

  • It is resolved during run time.

  • Virtual methods use this technique.

  • It uses objects to resolve the binding.

  • Example: Method overriding.

Updated on: 24-Mar-2021

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements