So I need some help with my APCS class. We have to make a code that with a specific runner class, would tell you if the discriminate on the quadratic formula is positive or without real solutions. This is my code so far, but I keep getting the error "Error: Syntax error on token ",", invalid AssignmentOperator" This is my code
import static java.lang.Math.*;
public class Quadratic
{
private double a,b,c;
public Quadratic(double aa, double bb, double cc)
{
a=aa;
b=bb;
c=cc;
}
public boolean hasSolutions ()
double calcDisc = Math.pow((b,2)-(4*a*c));
if (CalcDisc < 0)
{
return false;
}
else
{
return true;
}
}
}
The line that says "double calcDisc = Math.pow((b,2)-(4*a*c));