Please send questions to
st10@humboldt.edu .
/**
* a VERY simple Java application that lets us
* investigate main()'s argument args
*
* by: Sharon M. Tuttle
* last modified: 1-29-01
**/
public class ArgsPlay1
{
public static void main(String args[])
{
System.out.println("Hello, world");
System.out.println("This call used "
+ args.length
+ " arguments.");
// overkill for making sure there IS a defined
// array args before attempting to walk through
// it
if (args != null)
{
if (args.length > 0)
{
for (int i=0; i < args.length; i++)
{
System.out.println("args[" + i
+ "]: " + args[i]);
}
}
}
}
}