Mercurial > hg > testrepo
view Hello.java @ 73:8bac79b4db25
summary: test
author | chrisphi |
---|---|
date | Wed, 15 Feb 2012 17:31:59 -0500 |
parents | be58a730334a |
children | 00b1ce768051 |
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 = 3; 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 ("orly?"); System.out.println ("yarly?"); System.out.println ("Slow and fuzzy"); } }