goto Statement
One of the most common uses for the goto statement is to break out of multiple levels of looping, something that in Java is performed using a break:
static final int gold = 1;static final int dross = 0;int field[100][100];...searchForGold: // a Java search of a doubly nested loopfor (int i = 0; i < 100; i++) for (int j = 0; j < 100; j++) if (field[i][j] == GOLD) break searchForGold; // ... execution comes here on break