What can I do to detect string input as an error, where the user has to enter an int value? What is the condition I can use to detect whether the user has entered a string value?
Scanner input = new Scanner(System.in); 
int characterNum = input.nextInt();
do{
 if ((characterNum < 0)&&(characterNum > 12)){
 System.out.println("Invalid Input, Try again");
  }
 characterNum = input.nextInt();
 }while((characterNum < 0)&&(characterNum > 12));
 
    