FileDocCategorySizeDatePackage
StaticImporter.javaAPI DocExample820Sat Apr 24 08:25:16 BST 2004com.oreilly.tiger.ch08

StaticImporter

public class StaticImporter extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    if (args.length < 2) {
      err.println(
        "Incorrect usage: java com.oreilly.tiger.ch08 [arg1] [arg2]");
      return;
    }

    out.println("Good morning, " + args[0]);
    out.println("Have a " + args[1] + " day!");

    try {
      writeError(System.out, "Error occurred.");
    } catch (IOException e) {
      e.printStackTrace();
    }
  
public static voidwriteError(java.io.PrintStream err, java.lang.String msg)

   
    // Note that err in the parameter list overshadows the imported err
    err.println(msg);