File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

command line

 
Zahra Vir
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help explain the concept of using the arg thingy in
public static void main (String args[])

so far i know that args can be named anything and that u can use it to get specific words ???

can someone elaborate a bit or provide some sort of example for this

thanks
 
Ed Lance
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suspect this has been answered here before but here's a start for you.

args is just a variable name...you could call it any legal identifier, it's simply the name of our String array.



After compiling, run this code from the command line with the "args" separated by a space, like this.

java CommandLineExample firstval secondval thirdval

Hope that helps!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic