ArrayIndexOutOfBounds exception in main method
<p>I am getting array bound error but to my mind, array starts from 0, so what is wrong with this code?</p>

<pre><code>public class Quadratic {

    public static void main(String[] args) {
        double b = Double.parseDouble(args[0]);
        double c = Double.parseDouble(args[1]);

        double discriminant = b*b - 4.0*c;
        double sqroot = Math.sqrt(discriminant);

        double root1 = (-b + sqroot)/ 2.0;
        double root2 = (-b - sqroot)/ 2.0;

        System.out.println(root1);
        System.out.println(root2);
    }
}
</code></pre>
