First of all...don't forget your semicolon at the end of "String test = args[0]"
Go to the "Run" menu and click "Open run dialog..." and you will be at the Main tab. To the right of that is the Arguments tab. Program arguments is where you put stuff separated by spaces(strings can have spaces by using quotes around it). Hope this meets all your needs.