Skip to content

Instantly share code, notes, and snippets.

@alexejVasko
Last active February 24, 2016 14:31
Show Gist options
  • Save alexejVasko/ac475fa1de93fd4f3834 to your computer and use it in GitHub Desktop.
Save alexejVasko/ac475fa1de93fd4f3834 to your computer and use it in GitHub Desktop.
package methods;
public class CountDown {
public static void main(String[] args) {
start(-4);
}
private static void start(int number){
if(number>=0){
while(number>=0){
System.out.println(number);
number--;
}
System.out.println("Go!");
}
if(number < 0){
System.out.println("Start failed!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment