Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • 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?
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!