Any arguments passed to the program on the command line can be accessed in the main() method of the class specified on the command line:
java Colors red green blue
These arguments are called program arguments. Note that the command name, java, and the class name Colors are not passed to the main() method of the class Colors.
Since the formal parameter of the main() method is an array of String objects, individual String elements in the array can be accessed by using the  operator.
In Example 3.8, the three arguments "red", "green", and "blue" can be accessed in the main() method of the Colors class as args, args, and args, respectively. The total number of arguments is given by the field length of the String ...