01: /*
02: This is a classical Hello program
03: to test source-highlight with Java programs.
04:
05: to have an html translation type
06:
07: source-highlight -s java -f html --input Hello.java --output Hello.html
08: source-highlight -s java -f html < Hello.java > Hello.html
09:
10: or type source-highlight --help for the list of options
11:
12: written by
13: Lorenzo Bettini
14: http://www.lorenzobettini.it
15: http://www.gnu.org/software/src-highlite
16: */
17:
18: package hello;
19:
20: import java.io.* ;
21:
22: /**
23: * <p>
24: * A simple Hello World class, used to demonstrate some
25: * features of Java source highlighting.
26: * </p>
27: *
28: * @author Lorenzo Bettini
29: * @version 2.0
30: */
31: public class Hello {
32: int foo = 1998 ;
33: int hex_foo = 0xCAFEBABE;
34: boolean b = false;
35: Integer i = null ;
36: char c = '\'', d = 'n', e = '\\' ;
37: String xml = "<tag attr=\"value\">ä</tag>", foo2 = "\\" ;
38:
39: public static void main( String args[] ) {
40: // just some greetings ;-) /*
41: System.out.println( "Hello from java2html :-)" ) ;
42: System.out.println( "\tby Lorenzo Bettini" ) ;
43: System.out.println( "\thttp://www.lorenzobettini.it" ) ;
44: if (argc > 0)
45: String param = argc[0];
46: //System.out.println( "bye bye... :-D" ) ; // see you soon
47: }
48: }