KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > simulator > crasher > HelloWorld


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.simulator.crasher;
5
6 import com.tc.exception.TCRuntimeException;
7
8 public class HelloWorld {
9   
10   public void run() {
11     int count = 0;
12     while (true) {
13       System.out.println("count=" + count);
14       System.err.println("count=" + count);
15       try {
16         Thread.sleep(1000);
17       } catch (InterruptedException JavaDoc e) {
18         throw new TCRuntimeException(e);
19       }
20       count++;
21     }
22   }
23   
24   public static void main(String JavaDoc[] args) {
25     new HelloWorld().run();
26   }
27 }
28
Popular Tags