my program consist of solving equations and asking the user if he want to solve more equation, so even though i enter yes to continue but the loop terminate ,this is my code
public static void main(String[] args) {
String goAgain;
double A, B, C, solution;
Scanner scanner = new Scanner(System.in);
System.out.println("This program will print a solution of an equation");
System.out.println("of the form A*X*X + B*X + C = 0, where A, B, and");
System.out.println("C are values that you enter.");
do {
System.out.println();
System.out.println("Enter values of A, B and C : ");
System.out.print(" A = ");
A = scanner.nextDouble();
System.out.print(" B = ");
B = scanner.nextDouble();
System.out.print(" C = ");
C = scanner.nextDouble();
System.out.println();
try {
solution = root(A, B, C);
System.out.println("your solution is : " + solution);
} catch (IllegalArgumentException e) {
System.out.println("Sorry, I can't find a solution.");
System.out.println(e.getMessage());
}
System.out.println("Do you want to solve another equation ? ");
goAgain = scanner.next();
System.out.println(goAgain);
} while (goAgain == "yes");
}