/*****************************************************************
** DemoCommandLineArgs - program to demonstrate command-line
**                       arguments
**
** Arrays are used in all java applications -- in the argument to
** the function 'main'.  The 'system' passes to main an array of
** strings.  The name of the array is 'args' (see below) and its
** length is 'args.length'.  Each element of the array is a
** string containing a command-line argument.  args[0] is the
** 1st command line argument, args[1] is the 2nd command line
** argument, and so on.  For example, if this program was
** invoked as
**
**    PROMPT>java DemoCommandLineArgs hello good bye
*
** then args.length is 3 and the args array would contain
**
**    args[0] = "hello"
**    args[1] = "good"
**    args[2] = "bye"
**
** (c) Scott MacKenzie, 2000                             
******************************************************************/
public class DemoCommandLineArgs
{
   public static void main(String[] args)
   {
      System.out.println(args.length + " command-line argument(s)");
      for (int i = 0; i < args.length; i++)
         System.out.println(args[i]);
   }
}

