Friday 6 April 2012

Dynamic Binding

Java - Dynamic Binding :

Binding refers to the linking of a procedure call to the code to be executed in response to the
call. Dynamic binding means that the code associated with a given procedure call is not Know until the time of the call at runtime. It is associated with polymorphism and inheritance. A procedure call associated with a polymorphic reference depends on the dynamic type of the reference.


Consider the procedure "draw" in Fig. By inheritance, every Object will have this procedure. Its algorithm is, however, unique to each object and so the draw procedure will be redefined in each class that defines the object. At run-time, the code matching the object under current reference will he called.


1 comment:

  1. Well, this is good article on Dynamic Binding which is essentially required in Java programming. This article very beautifully defines it and explain its use in programming.

    ReplyDelete