You need to display the error message in catch block


public static void main(String[] args) {

Scanner input = new Scanner(System.in);
int min = 0;
boolean repeat...