158k views
1 vote
When more than one method of the same name is included in a class, it is referred to as method?

1) passing
2) duplicating
3) overloading
4) voiding

1 Answer

1 vote

Final answer:

Method overloading is when more than one method of the same name is included in a class. It allows a class to have multiple methods with the same name but different parameters.

Step-by-step explanation:

When more than one method of the same name is included in a class, it is referred to as method overloading. Method overloading in programming allows a class to have multiple methods with the same name but different parameters. This can be useful when you want a method to perform slightly different tasks depending on the arguments it receives.

User Carmello
by
7.4k points