Simple Java Program of Command line arguments

class CommandLineArgument
{
public static void main(String[] args)
{
      System.out.println("Hi " +args[0]);
}
}
save it with C.java (you can save it with any name)
compile as usual
java CommandLineArgument Kunal
The output will be
Hi Kunal

Comments

Popular posts from this blog

How to set background color of navigation bar in iPhone

Checking Device Info in ios

Command Line Argument in C