How to read multiple arguments separated with space in one line

How to modify the [CODE]public static void main (String[] args){}[/CODE]so that it can read multiple arguments separated with space in a single line?e.g.java myprogram username password hostjava myprogram2 ipaddress portThx.
[280 byte] By [roamera] at [2007-11-27 7:30:41]
# 1
--
Redxxiva at 2007-7-12 19:10:55 > top of Java-index,Java Essentials,Java Programming...
# 2

public static void main (String[] args){

int index = 0;

for(String arg : args) {

System.out.println("args["+(index++)+" = "+arg);

}

}

prometheuzza at 2007-7-12 19:10:55 > top of Java-index,Java Essentials,Java Programming...
# 3
In other words: the String[] args contains exactly what you want.
Herko_ter_Horsta at 2007-7-12 19:10:55 > top of Java-index,Java Essentials,Java Programming...
# 4
Ha, Thx for your help.
roamera at 2007-7-12 19:10:55 > top of Java-index,Java Essentials,Java Programming...