public static void quadraticEquation(double a, double b, double c) {
// Fill your code here
double sol2=0.00d;
double sol1=0.00d;
double d=(b*b) - (4*a*c);
if (d>=0){
sol1=(-b+Math.sqrt(d))/(2*a);
sol2=(-b-Math.sqrt(d))/(2*a);
return sol1,sol2;
}else{
System.out.println("There are no real values for solving the equation");
}
}// quadraticEquation
this is my code but where it says (return sol1,sol2;) it shows me this message: The primitive type double of sol1 does not have a field sol2 Also I think another thing that i got wrong is the "," but i dont know how i'm supposed to separate those in java. I'm just starting with java so I could really use any help. Thank you :) Edit: I didnt mention that i cant create a new class for that because it is an assignment that doesnt let me do that