I have loop designed to validate the user input on a question, it was working fine until I added this;
if (userInput.charAt(0) > NUMCOLS && userInput.charAt(0) < 0);
{
System.out.println("Error, " + userInput + " is an invalid move.");
continue;
}
before this
if (userInput.charAt(2) !='-')
{
System.out.println("Error, " + userInput + " is an invalid move.");
continue;
}
Now whenever I try to compile I get an error stating that this is an unreachable statement, what is causing this?