I am using the following code:
while (invalidInput)
{
// ask the user to specify a number to update the times by
System.out.print(\"Specify an intege
In your last else block, you need to clear the 'w' or other invalid input from the Scanner. You can do this by calling next() on the Scanner and ignoring its return value to throw away that invalid input, as follows:
else
{
System.out.println("You have entered an invalid input. Try again.");
in.next();
}