Computer Science, asked by atharv1702, 1 month ago

explain the concept of method overloading with an example in java​

Answers

Answered by sapnakumare27271
2

Answer:

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

Answered by helendhwani
0

Answer:

In Java, two or more methods may have the same name if they differ in parameters (different number of parameters, different types of parameters, or both). These methods are called overloaded methods and this feature is called method overloading. For example: void func() { ... } void func(int a) { ... }

Similar questions