File: test.java

package info (click to toggle)
source-highlight 1.11-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,872 kB
  • ctags: 4,699
  • sloc: sh: 3,633; cpp: 2,606; lex: 2,463; ansic: 1,610; makefile: 537; php: 185; perl: 145; yacc: 122; ruby: 63; sed: 53; python: 45; ml: 38; java: 30
file content (37 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
  This is a classical Hello program
  to test source-highlight with Java programs.
  
  to have an html translation type

	source-highlight -s java -f html --input Hello.java --output Hello.html
	source-highlight -s java -f html < Hello.java > Hello.html

  or type source-highlight --help for the list of options

  written by
  Lorenzo Bettini
  http://www.lorenzobettini.it
  http://www.gnu.org/software/src-highlite
*/

import java.io.* ;

public class Hello {
    int foo = 1998 ;
    int hex_foo = 0xCAFEBABE;
    boolean b = false;
    Integer i = null ;
    char c = '\'', d = 'n', e = '\\' ;
    String xml = "<tag attr=\"value\">&auml;</tag>", foo2 = "\\" ;
    
    public static void main( String args[] ) {
	// just some greetings ;-)  /*
	System.out.println( "Hello from java2html :-)" ) ;
	System.out.println( "\tby Lorenzo Bettini" ) ;
	System.out.println( "\thttp://www.lorenzobettini.it" ) ;
        if (argc > 0)
            String param = argc[0];
        //System.out.println( "bye bye... :-D" ) ; // see you soon
    }
}