---
# System prepended metadata

title: '007public class Break應用 {'

---

# 007public class Break應用 {
break的作用是跳離迴圈
break只能在迴圈與 switch case 內使用

	public static void main(String[] args) {

		for (int i=0; i<10; i++){
			System.out.println(i);
			if (i==7){
				break;
			}
		}
		
	}

}
