Generally you can use a combination of lable
and break
to jump to where you want like this
OUTER_LOOP: for (int i = 0; i<arr.length;i++) {
for(int j =0; j<someArr.length; j++) {
//after this inner loop, continue with the other loop
break OUTER_LOOP;
}
}
If you want to break to some where in the outer loop you do like this, put the lable where you want to jump to(outside of the current loop) and use that lable in the break statement.
for (int i = 0; i<arr.length;i++) {
//line code 1
OUTER_LOOP: // line code 2
for(int j =0; j<someArr.length; j++) {
//after this inner loop, continue with the other loop
break OUTER_LOOP;
}
}