title: return parameters from command line program
body: <p>I'm trying to pass a String via Command Line in java, but it returns only the first value i.e. <code>args[0]</code></p>
  
  <p>Below is what I've done</p>
  
  <pre><code>public class CommandLine
  {
      public static void main(String[] args)
      {
          int i;
          i = args[0].length(); //throws error here if args.length();
          System.out.println(i); //checking length, return with args[0] only
           while(i&gt;0)
          {
              System.out.println(args[0]);
              i++;
          } 
      }
  }
  </code></pre>
  
  <blockquote>
    <p>What should I do to improve this and make it working?</p>
  </blockquote>