Skip to content

Instantly share code, notes, and snippets.

@uncoded-ro
Created January 12, 2020 14:04
Show Gist options
  • Save uncoded-ro/2faae9bb41ea35fedfeb8ade7229b40a to your computer and use it in GitHub Desktop.
Save uncoded-ro/2faae9bb41ea35fedfeb8ade7229b40a to your computer and use it in GitHub Desktop.
class InstrBreak {
public static void main(String[] args) {
int i;
i = 0;
while (i < 10) {
if (i == 5)
break;
System.out.print(i + " ");
i++;
}
System.out.print("\n");
out: for (i = 0; i < 10; i++) {
if (i == 5)
break out;
System.out.print(i + " ");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment