Doubt in return statement

hello,
I have a doubt in return statement that if I created a function which returns boolean for example,

Static boolean func(int n){
for (int i = 1; i <= n-1; i += 1)
{
if (i%2== 0)
return false;
}
return true;
}

then in this case isn’t this function always going to return true? even if the ’ if ’ condition inside the for loop is satisfied as the ’ return true’ statement is written outside of the ’ for ’ loop.

no, once you return something from the function that function call ends