-Ive cut out the main code as it seems unnecessary, the issue seems with this, The code runs once then even if i type 'yes' as an answer to the scanner, the loop stops. It only loops once.
String bool = "yes";
while (bool == "yes") {
int e1 = whichExam();
printinfo(pp, csn, isa, fwt, lds, afl, oop, e1);
Scanner scanner = new Scanner(System.in);
System.out.println("Do you want to check another exam ('yes' or 'no')?");
bool = scanner.nextLine();
}