Mercurial > hg > testrepo
view Hello.java @ 63:9c7ab60f9005
Fix indentation. GNU style!
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Sun, 06 Mar 2011 01:37:21 +0100 |
parents | adf3ec5f75a9 |
children | c8515f99b622 |
line wrap: on
line source
import java.io.*; public class Hello { public static void main (String[] args) { System.out.println("nw task 1"); Hello.hello(); System.out.println (args.length > 0 ? args[0] : "Unknown person"); World.world(); new Mandelbrot(); System.out.println(""); System.out.println("nw task 2"); new Something().doit(); System.out.println(new Something().dontdoit()); } private static class Something { int x=5; public Something() { System.out.println ("something"); } public void doit() { x++; System.out.println (x); x--; } public int dontdoit() { x++; x--; return x; } } static void hello() { System.out.println ("Hello World!"); System.out.println ("Greetings Venus!"); System.out.println ("I am not so cool!"); System.out.println ("But I am!"); System.out.println ("Oh really?"); } }