javac CLA.java java CLA a s this 1the command line arguements would be "a s this 1"
public static void main(String[] args)the "args" variable is there to get the command line arguements.
Inside you main mathod write a loop to print all of the command line arguements.For instance, in the example above, your program might should output
0 a 1 s 2 this 3 1Make sure the output of your program agrees with this sample. Also try your program with other command line arguements.
The idea is to create an array of strings that the program will use if there are no command line arguements. That array would look exactly like the command line args. For instance (keeping witht he example above),
String[] myDefaults = {"a", "s", "this", "1"};Then use this array of default arguements when the program starts with no arguements from the command line.
Extend your main method to have a set of default arguements and use them when no command line arguements are provided.
In the future many of the assignments will use command line arguements. The technique implemented in this lab should make your debugging and development easier.