KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > LabelFor


1 public class LabelFor {
2
3     public static void main(String JavaDoc [] args) {
4         int x = 0;
5         one: for (; x < 10; x++) {
6                  
7                  if (x > 5) break one;
8                  System.out.println(x);
9              }
10     }
11 }
12
13
Popular Tags