KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > LabelWhile


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