Dec 2, 2011

(Static vs Dynamic) binding in Java

dynamic-binding-vs-static-binding
Polymorphism via inheritance or interfaces are done by dynamic binding. They are bound during the run time.

late-binding-vs-static-binding
static methods, private methods, member variable initializations are done by static binding. They are done at compile time.
Compiler decides the member variable value depending on the type of reference that has been used when resolving member variable value with the same name from super and sub class.

No comments:

Cat

Snow Shoe Cat   Bombay Cat   Ragdoll Cat         Persian Cat     Finish Cat