How to use Command Line Arguments in Java ?.

Program to demonstrate how to use Command Line Arguments in Java.
 





Click here to download complete source code 
public class CommandLineArguments {

 public static void main(String[] args) {
  
  System.out.print(args[0] + " ");
  
  System.out.print(args[1]);
  

 }

}



Click here to download complete source code

Output of the program :

hello world