View Single Post
  #4 (permalink)  
Old 02-25-2008, 01:08 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Code:
java MyProgram param1 param2
Above would be the command to run your program in the command line and passing the parameters to String[] args.. which is the parameter that you have in the main method of your program.. You may have guessed on how to access these arrays already...

Code:
// here's the current values of args[]
args[0] = param1
args[1] = param2

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote