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 enable curl option in php

Simple Socket programming using TCP in java