Mercurial > hg > testrepo
changeset 63:9c7ab60f9005
Fix indentation. GNU style!
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Sun, 06 Mar 2011 01:37:21 +0100 |
parents | 7aee0155a36a |
children | 347e3fb76105 |
files | Hello.java |
diffstat | 1 files changed, 29 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- 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?"); + } } -}