Java / Control Statements
Does returning a value from the loop body break the loop?
Yes. return statement breaks the loop and returns from the entire method immediately. The only code that will be executed is the finally clause and the release of any synchronized statement.
The same applies to the break statement as well, the finally clause will be executed before exiting the loop.
More Related questions...