So I made a program, and I need to keep prompting for coordinates if the user enters a non-negative, invalid input. Meaning that if the user enters a number above 2 or a letter it should ask him to choose again. The problem that I am running into is that right when I enter a letter, the program terminates and I get InputMisMatchException for the letter, and ArrayOutOfBoundsException for the higher numbers. Is there a way to bypass all those errors and just ask the user to pick again?
So for example:
"Enter the coordinates to place an 'X'. Row then Column."
//enters number > 2 or letter
"Invalid input. Please choose again."