Skip to content

Instantly share code, notes, and snippets.

@javadovjavad
Created September 13, 2014 16:04
Show Gist options
  • Save javadovjavad/60b22f2cb383fe6ceddc to your computer and use it in GitHub Desktop.
Save javadovjavad/60b22f2cb383fe6ceddc to your computer and use it in GitHub Desktop.
public class For {
public static void main(String[] args) {
for (int i = 1; i < 1; i++) {
System.out.println(i);
}
//break & continue
int x=0;
while (++x<500) {
if (x==5) break;
System.out.println(x);
}
int y=0;
while (++y<50) {
if (y==5) continue;
System.out.println(y);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment