Kartier Pohs

Tuesday, June 16, 2015

Command line arguments in Java.

Command line arguments in Java.
Command line arguments in Java.
class Comlarge
{
  public static void main(String args[])
    {
      int count,i=0;
      String string;
      count=args.length;
      System.out.println("Number of arguments= " +count);
      while(i<count)
       {
         string=args[i];
         i=i+1;
         System.out.println(i+":"+" Java is " +string);
        }
     }


}
OUTPUT
 Command line arguments in Java.

No comments:

Post a Comment

Copyright 2015 @ Yogesh Prasad