/* * T01n24.java -- A very simple demonstration of how to access any * command-line arguments provided when the program was executed. * * Recall that this is how to execute a Java application from the command line: * $ java T01n24 * If the user wants to supply some information for the program to use, * without having to wait for the program to prompt for it, it may be * possible to type the information after the program name on the command * line. For example: * $ java T01n24 a bouncy "string of stuff" * If the code is written to accept info in this manner, it can speed up * common functionality. This isn't as useful in Java, given its Internet * focus, than in other languages that have more of a text I/O focus. * * UNIX command line utilities use this mechanism frequently. Example: * $ ls -l * For that matter, the string "T01n24" is actually a command-line * argument to Java. */ //import java.io.*; public class T01n24 { public static void main (String [] args) { if (args.length > 0) { for (int i=0; i"); } } }