This is the syntax highlighted version of CommandLine.java.
/*************************************************************************
* Compilation: javac CommandLine.java
* Execution: java CommandLine [command line arguments]
*
* Print out the command line arguments, one per line.
*
* % java CommandLine this is a test
* this
* is
* a
* test
*
*************************************************************************/
public class CommandLine {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++)
System.out.println(args[i]);
}
}
Last updated: Wed Feb 11 18:16:34 EST 2004
.
Copyright © 2004, Robert Sedgewick and Kevin Wayne.