Exception in Java program
<p>When I run the code give below, the following message showed up. What does it mean and how do I overcome it in this instance?</p>

<blockquote>
  <p>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
      at ifDemo.main(ifDemo.java:5)</p>
</blockquote>

<pre><code>public class ifDemo {
public static void main (String [] args)

{
    int x= Integer.parseInt(args[0]);
    double half=0.0;
    if (x!=0)
    {
        half=x/2.0;
        System.out.println(x+ "/2 = "+half);
    }
    if (x==0)
    {
        System.out.println("The value of x is "+x);
    }
    int y=x*5;
    char grade='F';
    if(y&gt;=85)
    {
        grade='A';
    }
    if (y&gt;=70 &amp;&amp; y&lt;85)
        grade='C';
    System.out.println("y=  "+y+ "and grade equal to  "+grade);

    }
}
</code></pre>
