You can Google this all you want. You'll never find the answer, and you don't need to. You just need to look at your own code.
Where do you define the return type of a method? What does that say?
|
|
v
int testSumArray(int[] numbers = null, int b = 2)
{
You're saying this method will return an integer.
Now look at all the
return
statements in that method. They they ALL return an integer? No. You've got true and false and then a
return conta
, which will never execute by the way.
Step through your code, line by line, and think about what that line alone is going to do.
A method will only ever execute any
return
statement once. Once the code hits a return statement, your method code will no longer run and control will be returned to whatever code called your method.