Java Command line Arguments (CLA)

In java programming, sometimes we want to pass information into a program during run time. We can do so by using command line argument.

All command line argument are passed as string

                                                                CLA are stored as string in string array passed to the args parameter of main(). The first CLA is stored at args[0], the second at args[1] and so on.

Example: Display all command line argument.

Command Line argument