|
Looping problem
the following will not loop i don't get why
import java.util.*;
import java.io.*;
public class CAITest
{
public static Scanner input = new Scanner(System.in);
public static void main(String args[])
{
CAI cai = new CAI();
String keepGoing = "y";
do
{
cai.generateQuestion();
cai.userAnswer = input.nextInt();
cai.checkResult();
input.nextLine();
keepGoing = input.next();
}
while(keepGoing == "y");
}
}
|