Mercurial > hg > testrepo
view Hello.java @ 60:adf3ec5f75a9
Turn printing "Hello World" back on, it broke the testsuite.
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Mon, 21 Feb 2011 09:30:45 +0100 |
parents | ebb2ffe4b1c8 |
children | 9c7ab60f9005 |
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?"); } }