39.8k views
3 votes
The number of arguments in a method call must match the number of parameters in the method declaration.

1.True
2.False

1 Answer

1 vote

Final answer:

The number of arguments in a method call must match the number of parameters in the method declaration.

Step-by-step explanation:

The statement, "The number of arguments in a method call must match the number of parameters in the method declaration." is True.

When calling a method, the number and type of arguments provided must match the number and type of parameters declared in the method.

For example, if a method is declared with two integer parameters, like this: public void add(int a, int b) {...} then when you call the method, you must provide two integer arguments, like this: add(5, 3);

User Leeza
by
7.6k points