output an error when someone enters a letter as a menu choice
<p>I want to make this program output an error when someone enters a letter as a menu choice</p>

<pre><code>package main;

import java.util.Scanner;

public class Main {
    Scanner input = new Scanner(System.in);

    public static void main(String[] args) {
        int UserIn = 0;
        double numberInputA;
        double numberInputB;
        double Answer;

        Scanner input = new Scanner(System.in);

        while (UserIn != 5) {
            System.out.println("What type of calculation would you like to perform?");
            System.out.println("1. Add\n2. Subtract\n" +
                               "3. Multiply\n4. Divide\n5. Exit");
            UserIn = input.nextInt();

            if (UserIn &gt; 5) {
                System.out.println("ERROR choose the numbers on the menu");
            } else if (UserIn &lt; 1) {
                System.out.println("ERROR choose the numbers on the menu");
            }

            if (UserIn &lt; 5) {
                System.out.println("Enter first number:");
                numberInputA = input.nextDouble();
                System.out.println("Enter second number");
                numberInputB = input.nextDouble();

                if (UserIn == 1) {
                    Answer = numberInputA + numberInputB;
                    System.out.println("Number 1 is:" + numberInputA);
                    System.out.println("Number 2 is:" + numberInputB);
                    System.out.println("Result is : " + Answer);
                    System.out.println("");
                }

                if (UserIn == 2) {
                    Answer = numberInputA - numberInputB;
                    System.out.println("Number 1:" + numberInputA);
                    System.out.println("Number 2:" + numberInputB);
                    System.out.println("Result is :" + Answer);
                    System.out.println("");
                }

                if (UserIn == 3) {
                    Answer = numberInputA * numberInputB;
                    System.out.println("Number 1:" + numberInputA);
                    System.out.println("Number 2:" + numberInputB);
                    System.out.println("Result is :" + Answer);
                    System.out.println("");
                }

                if (UserIn == 4) {
                    Answer = numberInputA / numberInputB;
                    System.out.println("Number 1:" + numberInputA);
                    System.out.println("Number 2:" + numberInputB);
                    System.out.println("Result is :" + Answer);
                    System.out.println("");
                }
            }

            if (UserIn == 5) {
                System.out.println("Program exited");
            }

        }
    }
}
</code></pre>
