Computer Science, asked by yash191919, 8 months ago

what do you mean by method overloading ​

Answers

Answered by tanya6968
3
Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists.

let’s get back to the point, when I say argument list it means the parameters that a method has: For example the argument list of a method add(int a, int b) having two parameters is different from the argument list of the method add(int a, int b, int c) having three parameters.
Answered by janu519
4

Explanation:

Two or more methods can have same name inside the same class if they accept different arguments. This feature is known as method overloading.

Similar questions