Java Args example
Java Args example
In your main method you can pass the arguments using args[] parameters. The args[] parameter can take any number of command line parameters.
Each argument is identified by a space. For example you can type following command on command prompt to call the java program:
C:\>java MyProgram param1 param2 param3
In the above code we are trying to execute the MyProgram java program passing the parameters “param1 param2 param3”.
Search for more Java args example.
Thanks