Thursday, 19 September 2013

My do/while loop is not working Java,eclipse

My do/while loop is not working Java,eclipse

So i got a Do while loop thats supposed to read user input , if user types
J then it should ask the user to type in 2 numbers to calculate them but
if the user Types N then it should stop the loop or kinda stop the program
any idea why it isnt working?
if (input.equalsIgnoreCase("J")) {
do
{
status=true;
}
while (status);{
if (input.equalsIgnoreCase("N"))
status = false;
}
}

No comments:

Post a Comment