FileDocCategorySizeDatePackage
LabeledWhile.javaAPI DocExample3035Mon Apr 06 18:10:26 BST 1998None

LabeledWhile

public class LabeledWhile extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    int i = 0;
    outer:
    while(true) {
      prt("Outer while loop");
      while(true) {
        i++;
        prt("i = " + i);
        if(i == 1) {
          prt("continue");
          continue;
        }
        if(i == 3) {
          prt("continue outer");
          continue outer;
        }
        if(i == 5) {
          prt("break");
          break;
        }
        if(i == 7) {
          prt("break outer");
          break outer;
        }
      }
    }
  
static voidprt(java.lang.String s)

    System.out.println(s);