What if we have an if statement inside a for loop, would it stop the loop or the if condition...
Example:
for (int i = 0; i < array.length; i++) {
The break command inside the IF statement will exit the FOR loop.
The break statement has no effect on if statements. It only works on switch, for, while and do loops. So in your example the break would terminate the for loop.
break
switch
for
while
do
See this section and this section of the Java tutorial.