The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

the commands line arguments ....

Posted by Jose Botella on March 27, 2001 at 5:49 PM

> > can i know the actually what \\(String[] arga) means i know that its used for in putting during runtime, but what actually that parameter used for ,and where its is invoked from,and what happens to the object "args",can u explain me with a simple example

args is the reference to an object. This object is an array of Strings objects that gets automatically created when the java application is launched. It contains the strings that were introduced in order after the invocation of the java "interpreter"
For instance :
java javaApplicac 0 1 2 3 4
would create an array of size 5 containing the string "0" at the position 0 of the array; and so on.
For more information read the java tutorial at java.sun.com





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us