Structure Query Language, C programming, Java, Servlet, Jsp, Unix

Showing posts with label how to take command line arguments in java. Show all posts
Showing posts with label how to take command line arguments in java. Show all posts

Sunday, 15 July 2012

taking command line arguments in java


[ student.java ]

import java.io.*;
class student
{
public static void main(String args[])
{
int i=0;
String name[]={"First","Second","Third","Fourth","Fifth","Sixth","Seventh"};
for(i=0;i<args.length;i++)
{
System.out.println(i+1 + " : " + name[i] + " Student Name is " + args[i]);
}
}
}