29 January 2012

Hello, World! - Final


Ultimate version of the classic Hello, World! bootstrap main program:

public class HelloWorldFinal {
   public static void main(String[] args) {
      String to = "World";
      if(args.length > 0) {
         to = args[0];
      }
      System.out.println(String.format("Hello, %s!", to));
   }
}

No comments:

Post a Comment