63.6k views
1 vote
Nonambiguous, overloaded methods must have the same . a) name b) number of parameters c) parameter names d) types of parameters

1 Answer

4 votes

Answer:

Option(a) is the correct answer for the given question.

Step-by-step explanation:

Method having same name but different arguments is known as method overloading .Method overloading is used to achieved the compile time Polymorphism in java .

For example :

void sum(int a); // function 1

void sum(int a,int b); // function 2

In this example the method name of both the function is same but different parameter .In function 1 only one integer parameter but in function 2 their are 2 integer parameter .

So correct answer is option(a) i.e name.

User Aboutstudy
by
7.2k points