Is this Overloading, methods with same name in different classes and different signature?
java, oop, overloading
Solution
Method add in class b is an overload of add in class a. Not an override. An override would just be a different implementation of the original add method.
Problem
If I have the following code in Java: ``` class A { public int add(int a , int b) { return (a+b); } } class B extends A { public float add(float a , float b) { return (a+b); } ``` In this particular case the sub-class isn't exactly overriding the base class's `add` function as they have different signatures and the concept of overloading occurs only if they are in the same scope. So, is the function `add(float , float)` in the sub-class `B` treated as an entirely new function and the concept of overloading and overriding is not applicable to it? And does it use 'Static binding' or 'Dynamic Binding'?