title: java netbeans commadline argument passing
body: <p>I am passing a command line argument using Netbeans but I get an <code>ArrayIndexOutOfBoundsException</code>.</p>
  
  <p>My code is:</p>
  
  <pre><code>public class CmdLineArgumentPassing
  
  {
  
        public static void main(String args[])
        {        
           System.out.println("Count : " + args.length);
  
           System.out.println("i : "+args[0]);
        }
  } 
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>Count : 0
  
  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
  </code></pre>