Thread: some queries
View Single Post
  #2 (permalink)  
Old 11-24-2007, 12:21 AM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
String args[] are the arguments that you pass to the program:
Code:
java Prog args args1 args2
args are then the arguments, put in the args[] array like so
Code:
args[0] = args args[1] = args1 args[2] = args2
run() is only used in threads, if i am understanding you right.

static has a meaning too long to explain in a single post. You might want to read the java tutorials or get yourself a good book.

edit: you always need to have a main method. It is the entry point to your program. The class that has your main method is the class that you do
Code:
java Foo
and it run. Otherwise you get an error.

Last edited by staykovmarin : 11-24-2007 at 12:35 AM.
Reply With Quote