Let\'s say I have this:
while(a){ while(b){ if(b == 10) break; } }
Question: Will the break statement take m
Only from the inner one. Use labeled break if you wish to break to specific loop
label1: for(){ label2: for(){ if(condition1) break label1;//break outerloop if(condition2) break label2;//break innerloop } }
Also See