Friday, March 13, 2009

command line args example code



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

System.out.println("Hello World!");
System.out.println(args[0]);

}
}


run: java Carg 200

output:
Hello World!
200 ----> it consider as string



0 comments:

Post a Comment