参考:blog.youkuaiyun.com/luoweifu/article/details/10756017
示例代码:
public class ContinueTest {
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
if (i == 3) {
System.out.println("I'm three");
continue;
}else if(i == 3){
System.out.println("haha");
continue;
}
System.out.println(i + " ");
}
}
}
运行结果:
0
1
2
I'm three
4
5
6
7
89
结论:
continue; 跳出本次循环,进入下次循环