continue:中断本次循环,继续进行下一次循环
static void breakvsContinue() { for (int i = 0; i < 10; i++) { if (i == 0) break; DoSomeThingWith(i); } the break will cause the loop to exit on the first iteration - DoSomeThingWith will never be executed. for (int i = 0; i < 10; i++) { if (i == 0) continue; DoSomeThingWith(i); } }
8 break 和 Continue 之间的区别,布布扣,bubuko.com
原文:http://blog.csdn.net/u011685627/article/details/33356229