---
# System prepended metadata

title: 078 TestContinue.java + TestBreakContinue1.java + TestBreakContinue2.java

---

# 078 TestContinue.java + TestBreakContinue1.java + TestBreakContinue2.java
1. TestContinue.java 
public static void main(String[] args) {
		for (int i=1; i<=10; i++) {
			if (i % 2 == 1) {
				continue;
			}
			System.out.println(i);
		}
	}
---
2. TestBreakContinue1.java
public static void main(String[] args) {
		int i = 1;
		int j;

		outer: //標籤
			while (i <= 3) {
			i++;
			j = 0;
			while (j <= 5) {
				j++;
				if (j == 4) {
					break outer;
                　　　　　　　//跳出不在執行           
				}
				System.out.println(j);
			}
		}
	}



3. TestBreakContinue2.java
public static void main(String[] args) {
		int i = 1;
		int j;

		outer: //標籤
			while (i <= 3) {
			i++;
			j = 0;
			while (j <= 5) {
				j++;
				if (j == 4) {
					continue outer;
                            　//跳出重新執行    
				}
				System.out.println(j);
			}
		}

