Created
December 4, 2015 11:39
-
-
Save ProZhar/b6175836fb17da3c5e87 to your computer and use it in GitHub Desktop.
com.javarush.test.level09.lesson11.home02
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 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 (Exception e) | |
| { | |
| e.printStackTrace(); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment