0

Java return statement

Though I have given the return statement why is this showing missing return statement? https://code.sololearn.com/cV6zJMGrBH7V/?ref=app

16th Jul 2020, 2:26 PM
SHIVANSH
SHIVANSH - avatar
4 ответов
+ 2
Add Return 0; at before closing the brackets at the function. Because a non-void function should always return something at last.
16th Jul 2020, 2:31 PM
Saphal Poudyal
Saphal Poudyal - avatar
+ 1
~ swim ~ Thanks Its working now.. 😀
16th Jul 2020, 3:05 PM
SHIVANSH
SHIVANSH - avatar
0
Thanks 😀
16th Jul 2020, 2:33 PM
SHIVANSH
SHIVANSH - avatar
0
~ swim ~ yes i want to return - 1 after checking full array..
16th Jul 2020, 2:35 PM
SHIVANSH
SHIVANSH - avatar