think about your for loop,
even you must loop through all that you might want only return ONE
true or false with following logic:
if the IF is true for first time brake and return true.
ELSE finish all loop and then return false.
int imax =5, jmax=5;
boolean check() {
for ( int i = 0; i < imax; i++) {
for ( int j = 0; j < jmax; j++) {
if ( something_is_true ) return true;
//else return false; // ERROR: This method must return a result of type boolean
}
}
return false; // move to here, outside the for loop!
}
but that is not only a logical question, also the
syntax check will look for possible situations where
no clear return is defined.