Dynamic Binding
Java gave us many important concepts like Inheritance, which is used to create a hierarchy of classes. And while coding with inheritance, we encountered another concept which we call as Method Overriding. In method overriding, we have a method in the sub-class as well as in the super-class, both having the same name and return type. While overriding a method the problem was that, how the compiler would know which function is being referred, by the caller. Therefore, to deal with this, java gave us Dynamic Binding. Dynamic Binding refers to the concept where the compiler is unable to resolve […]