class CommandLineExample{ public static void main(String args[]){ System.out.println("Your first argument is: "+args[0]); } } //Now follow these steps compile by > javac CommandLineExample.java run by > java CommandLineExample sonoo
public class CommandLine { public static void main(String args[]) { for(int i = 0; i<args.length; i++) { System.out.println("args[" + i + "]: " + args[i]); } } }