Friday, March 13, 2009

command-line-arguments-foreach



class Cargforeach
{
public static void main(String[] args)
{


for(String s:args)
{
System.out.println(s);
}

}
}

run: java Cargforeach java from sun

output:
java
from
sun



0 comments:

Post a Comment