class CommandLineArgs {
   
   public static void main(String[] args) {
      
      System.out.println(args.length);
      
      // reading the command line args
      
      // old-style
      for (int i = 0; i < args.length; i++) {
         System.out.println(args[i]);
      }
      
      // new style
      for (String s : args) {
         System.out.println(s);
      }
   }
}