Skip to content

Instantly share code, notes, and snippets.

@heckenmann
Created February 24, 2015 18:38
Show Gist options
  • Save heckenmann/6d0d5e3fdbb0ff97de7f to your computer and use it in GitHub Desktop.
Save heckenmann/6d0d5e3fdbb0ff97de7f to your computer and use it in GitHub Desktop.
while-Schleife
public class WhileSchleife {
public static void main(String... args) {
int start = 0; // Start der Zählung festlegen
int ende = 15; // Ende festlegen
while(start <= ende){
System.out.println(start); // Momentanen Wert ausgeben
start++; // Momentanen Wert erhöhen
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment