File: CountingApp.java

package info (click to toggle)
blcr 0.8.5-2.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 10,728 kB
  • ctags: 3,413
  • sloc: ansic: 31,999; sh: 12,633; makefile: 929; perl: 401; cpp: 79; java: 9
file content (14 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** 
 * The CountingApp class implements an application that
 * simply prints "X Hello" to standard output for X
 * from 0 to 9, pausing 1 second between each line.
 */
class CountingApp {
    public static void main(String[] args) throws InterruptedException {
        for (int i = 0; i < 10; ++i) {
            System.out.print(i);
            System.out.println(" Hello");
            Thread.sleep(1000);
        }
    }
}