Which of the following are true regarding overloading of a method?
Select 1 option
Correct Option is : B
For overloading a method, the "signature" of the overloaded methods must be different.
A method signature includes method name and the number and type of arguments that it takes.
If the parameter list of the two methods with the same name are different either in terms of number or in terms of the types of the parameters, then they are overloaded.
For example:
Method m1 is overloaded if you have two methods:
void m1 (int k); and void m1 (double d);
or if you have:
void m1 (int k); and void m1 (int k, double d);
return type is not considered a part of the method signature.
D. is talking about overriding and not overloading.