Command Line Argument - Count

 import java.util.*;

public class Main{
    public static void main(String[] args){          
           //Fill your code
           int count=0;
           
           System.out.println("Arguments :");
           for(int i=0;i<args.length;i++) {
               System.out.println(args[i]);
               count++;
               
               
           }
           System.out.println("The number of arguments is "+count);
       }
   }


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.