I have applied a check for not allowing alphabets.But its not working
<pre><code>import java.util.Scanner;

public class Main extends Hashmap{

    public static void main(String[] args) {
        Hashmap hm = new Hashmap();
        int x=0;
        Scanner input = new Scanner(System.in);
        do{
            System.out.print("Enter any integer value between 1 to 12: ");
            x = input.nextInt();
        }while(x&lt;=0 || x&gt;12);
        Scanner sc = new Scanner(System.in);
        //int number;


       do {
           while (!sc.hasNextInt())
           {
            System.out.println("That's not a number!");
            sc.next();
           }
            x = sc.nextInt();
           }while(x&gt;=0);

        String month = hm.getEntry(x);
        System.out.println(month);




}
    }
</code></pre>

<p>here I need to restrict user from entering an alphabet.But its not working.
pls help...</p>
