Last active
February 24, 2016 14:31
-
-
Save alexejVasko/ac475fa1de93fd4f3834 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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