Error ";",, expected after variable declaration
<p>Syntax error ";",, expected on line "double a, b, c, discriminant, root;"</p>

<p>How do I resolve this error?</p>

<pre><code>public class Quadratic {

    double a, b, c, discriminant, root;

    discriminant = (b * b) - 4 * a * c;

    public Quadratic(double a, double b, double c) {
    }

    public String calculateroots() {

        if (discriminant &gt;= 0){
            root = Math.sqrt(discriminant) / (2 * a);

            System.out.println("Your roots are " + (-1 * b) + "+" + root + "and" + (-1 * b) + (-1 * root) +".");
        }
        else {
            root = Math.sqrt(Math.abs(discriminant)) / (2 * a);

            System.out.println("Your roots are " + (-1 * b) + "+ i" + root + "and" + (-1 * b) + "i" + (-1 * root) +".");
        }
        }
    }
</code></pre>