ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Static Binding vs Dynamic binding Java

1) Static binding in Java occurs during Compile time while Dynamic binding occurs during Runtime.

 

2) private, final and static methods and variables uses static binding and bonded by compiler while virtual methods are bonded during runtime based upon runtime object.

 

3) Static binding uses Type(Class in Java)  information for binding while Dynamic binding uses Object to resolve binding.

 

4) Overloaded methods are bonded using static binding while overridden methods are bonded using dynamic binding at runtime. Here is an example which will help you to understand both static and dynamic binding in Java.

Related Posts Plugin for WordPress, Blogger...
Flag Counter