// Sleepings.java (c) 2005 Kari Laitinen // http://www.naturalprogramming.com // 2005-05-15 File created. // 2005-05-15 Last modification. class Sleepings { public static void main( String[] not_in_use ) { System.out.print( "\n Let's first wait 5 seconds ... \n" ) ; try { Thread.sleep( 5000 ) ; // 5 s = 5000 milliseconds } catch ( InterruptedException caught_exception ) { } System.out.print( "\n Counting down ... \n\n" ) ; for ( int shrinking_number = 10 ; shrinking_number >= 0 ; shrinking_number -- ) { try { Thread.sleep( 1000 ) ; // 1 second pause. } catch ( InterruptedException caught_exception ) { } System.out.print( " " + shrinking_number + "\u0007" ) ; } System.out.print( "\n\n" ) ; } }