This is the syntax highlighted version of ParameterDemo.java.
/*************************************************************************
* Compilation: javac ParameterDemo.java
* Execution: java ParameterDemo [list of parameters]
*
* Prints the list of commandline parameters to standard output.
*
* Sample execution:
*
* % java ParameterDemo these are the commandline parameters
* You gave me these parameters:
* these
* are
* the
* commandline
* parameters
*
*************************************************************************/
public class ParameterDemo {
public static void main(String[] args) {
System.out.println("You gave me these parameters:");
for (int i = 0; i < args.length; i++)
System.out.println(args[i]);
}
}
Last updated: Wed Feb 11 18:07:23 EST 2004
.
Copyright © 2004, Robert Sedgewick and Kevin Wayne.