Monday, 5 December 2016

Command Line Argument

Command Line Argument

  • Command line argument is the way by which we can provide the values to the program from outside the program.
  • The java tool provide the syntax to pass the command line argument.
Give the argument at run time

Ex:
Command line argument

  • All the command line argument is automatically stored into the array and that array is automatically passed into the argument of main method by the JVM.
Example: -A java program to get the command line values.





All the command line argument separated by the space.

[Note: -in the java each array has the length properties that specify the no of elements content by the array.]

No comments:

Post a Comment