do
{
String type = in.nextLine();
if (!type.equals("OneTime") && !type.equals("Daily") && !type.equals("Monthly"));
{
System.out.println("Error, please enter OneTime, Daily or Monthly as" +
" type of appointment");
checker = true;
}
else
{
checker = false;
}
}
while (checker);
So that gives me an error about that else statement when I compile it. However, when I take out the else statement, it will compile fine. I cannot see what the error is. Also checker was declared earlier in the program so no need to worry about that. Thanks!
Aucun commentaire:
Enregistrer un commentaire