[ student.java ]
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]);
}
}
}
GoTo Command Prompt(Win + R)
ReplyDeleteHOW TO COMPILE
javac c:\yourdir\student.java
HOW TO EXECUTE
java c:\yourdir\student