When we declare more than one method under the same name in one class but each method signature is different from each other then it is called as method overloading
When we want to implement the method overloading following 4 condition need to be met
1 Either the number of parameter has to be different
2. if not parameter identifiers has different
3 if not parameters data types have to be different
4 last option is at least return data type of the method has be different
Comments
Post a Comment