KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > janalyzer > HelloWorld


1 package janalyzer;
2
3 /**
4  *
5  * Date: May 13, 2002
6  * Time: 12:17:38 AM
7  * Test class to look at indentation and line separation
8  */

9
10 public class HelloWorld
11 {
12
13   private static String JavaDoc message;
14
15   static
16   {
17     message="hello world";
18   }
19
20   public static void main(String JavaDoc[] args) {
21     try
22     {
23       int i=0;
24       do
25       {
26         printMessage(i+". "+message);
27         i++;
28       }
29       while (i<10);
30     }
31     catch (Exception JavaDoc e)
32     {
33       e.printStackTrace();
34     }
35   }
36
37   private static void printMessage(String JavaDoc message)
38   {
39     System.out.println(message);
40   }
41
42 }
43
Popular Tags