There is Static binding and also Dynamic binding. The compiler has to choose from one or the other. Stactic binding defines the properties of the variables at compile time. Therefore, they can't be changed. In dynamic binding the properties of the variables are determined at runtime. Since the variables can change in form, dynamic binding is more flexible but slower. A great example is given in wikipedia it states: Suppose all life-forms are mortal. In object oriented programming, we can say that the Person and Plant classes must implement the Mortal interface, which contains the method die(). Persons and Plants die in different ways; for example, Plants do not have hearts that stop. Dynamic binding is the practice of figuring out which method to invoke at runtime. For example, if we write void kill(Mortal m) { m.die(); } it's not clear whether m is a Person or a Plant, and thus whether Plant.die() or Person.die() should be invoked on the object. With dynamic binding, the m object is examined at runtime, and the method corresponding to its actual class is invoked.
Chat with our AI personalities
Static polymorphism is used the concept of early binding or we can say compile time binding where as dynamic polymorphism used the concept of late binding or run time binding.
Dynamic binding, or late binding, is when the object code for the class does not get loaded into memory until it is needed. This saves time at module load time, at the cost of delayed execution for the first invocation.
Dynamic binding
There is no preference as such. The type of binding you use is more dependant upon the design and circumstance rather than any preference you may have. Static binding is certainly more predictable and therefore easier to program, but dynamic binding offers much greater flexibility.
hi my question is why to use de DVR end eplain why i do to use the simulation and studieng of the Dynamic Voltage restorer why matlab.