# HG changeset patch # User Mark Wielaard # Date 1299371841 -3600 # Node ID 9c7ab60f900577369670703673eb1fab5af1a9ae # Parent 7aee0155a36a269922fd0c6315de46726e099689 Fix indentation. GNU style! diff -r 7aee0155a36a -r 9c7ab60f9005 Hello.java --- a/Hello.java Thu Mar 03 10:35:39 2011 +0100 +++ b/Hello.java Sun Mar 06 01:37:21 2011 +0100 @@ -1,39 +1,43 @@ import java.io.*; + public class Hello { public static void main (String[] args) { -System.out.println("nw task 1"); + 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()); + 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; + private static class Something + { + int x=5; + + public Something() + { + System.out.println ("something"); + } -public Something(){ - System.out.println ("something"); -} -public void doit(){ -x++; - System.out.println (x); -x--; -} + public void doit() + { + x++; + System.out.println (x); + x--; + } -public int dontdoit(){ -x++; -x--; -return x; -} - -} - + public int dontdoit() + { + x++; + x--; + return x; + } + } static void hello() { @@ -42,5 +46,5 @@ System.out.println ("I am not so cool!"); System.out.println ("But I am!"); System.out.println ("Oh really?"); + } } -}