Command Line Argument in Java


Here is the simple program for printing command line argument in Java.

Source Code

//Program Using Command Line Argument
import java.io.*;
import java.util.Scanner;
class fruits
{
	public static void main(String args[])
	{
		for(int i=0;i<args.length;i++)
		{
			System.out.println("Values["+i+"] :"+args[i]);
		}
	}
}
To download raw file Click Here



Learn All in Tamil © Designed & Developed By Tutor Joes