69.9k views
1 vote
Overloaded methods must be differentiated by: Select one: a. method name b. data type of arguments c. method signature d. None of the above

User Borisano
by
3.7k points

1 Answer

5 votes

Answer:

b. data type of arguments

Step-by-step explanation:

One of the ways to overload a method is using different type of arguments. Let's say we have a method that finds and returns two integer values

public int sumValues(int num1, int num2){

return num1 + num2;

}

We can overload this method by passing double values as arguments

public double sumValues(double num1, double num2){

return num1 + num2;

}

User Mattjgalloway
by
4.2k points