Taking in Command Line Arguments
In Java, the program can be written to accept command-line-arguments.
Example Code: command-line arguments
/* This Java application illustrates the use of Java command-line arguments. */
public class CmdLineArgsApp {
public static void main(String[] args){ //main method
System.out.println("First argument" + args[0]) ;
System.out.println("Second argument" + args[1]) ;
}//end main
}//End class.
|