• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java 2

 
Prasanna Vijaya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to store commandline arguments in a string
 
Allen Alchian
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do the following...
-----------
public static void main (String args[])
{
String myArg;
myArg = args[0];
----------
The first argument is args[0], the second is args[1], etc.
Does this answer your question?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic