What is the difference between static and dynamic binding?

前端 未结 6 651
予麋鹿
予麋鹿 2021-01-31 09:41

Binding times can be classified between two types: static and dynamic. What is the difference between static and dynamic binding?

Could you give a quick example of each

6条回答
  •  失恋的感觉
    2021-01-31 10:43

    Binding done at compile time is static binding and binding done at run time is dynamic binding.In static binding data type of the pointer resolves which method is invoked.But in dynamic binding data type of the object resolves which method is invoked.

提交回复
热议问题