java - Continue at first loop , inside the second loop -


this understand better:

for(object o : objects){//first loop     for(int j = 0; < y; j++){//second loop          if(something_is_true)             stop second loop , continue first loop       } } 

am supposed use continue keyword that"?

no, use 'break'.

for(object o : objects){//first loop   for(int j = 0; < y; j++){//second loop      if(something_is_true)        break;    } } 

Comments

Popular posts from this blog

ios - Change Storyboard View using Seague -

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -