Question With Options:
When a superclass variable refers to a subclass object and a method is called on that object, the proper implementation is determined at execution time. What is the process of determining the correct method to call?
a. early binding.
b. non-binding.
c. on-time binding.
d. late binding.
Answer:
d. late binding
Step-by-step explanation:
In computer programming, binding generally means assigning identifiers to memory locations. By identifiers, we mean variable and function names. This binding can either be done at compile time or run(execution) time. When it is done at compile-time, it is called early binding. Otherwise, when it is done at execution time, it is called late binding.
Therefore, when the superclass variable refers to the subclass object and a method is called on that object, the proper implementation determined at execution time is a process called late binding.