Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
<pre><code>public class TestSample {
    public static void main(String[] args) {
        System.out.print("Hi, ");
        System.out.print(args[0]);
        System.out.println(". How are you?");
    }
}
</code></pre>

<p>When I compile this program, I get this error: </p>

<blockquote>
  <p>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0</p>
</blockquote>

<hr>

<p>Also, why can't I have an <code>args</code> which accepts an int array like this: </p>

<pre><code>public static void main(int[] args) {
</code></pre>
