Created
April 24, 2015 20:17
-
-
Save ZhdanRuslan/b3fb032c96a5cdecd0ca to your computer and use it in GitHub Desktop.
level09.lesson11.home02
This file contains 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 com.javarush.test.level09.lesson11.home02; | |
/* Обратный отсчёт от 10 до 0 | |
Написать в цикле обратный отсчёт от 10 до 0. Для задержки иcпользовать Thread.sleep(100); | |
Обернуть вызов sleep в try..catch. | |
*/ | |
public class Solution | |
{ | |
public static void main(String[] args) | |
{ | |
for (int i = 10; i >= 0; i--) | |
{ | |
System.out.println(i); | |
try { | |
Thread.sleep(100); | |
} catch (InterruptedException e) | |
{ | |
e.printStackTrace(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment