title: Java. How to make an error message for when userInput is a string instead of an int?
body: <p>I'm working on a sort of test in Java, in which the user is given a question like this: " 4 + ? = 12". The numbers are randomised and so is the questionsmark.</p>
  
  <p>I need to make an error message for when the user input isn't an int. For example if the user types in the word "eight" instead of "8" an error message will show up. How can I do this? </p>