title: Can i use Scanner within a catch statement
body: <p>If I type in letter for the first Scanner statement i get "error!!" and "enter a number" but cannot input another number.I am a beginner and do not know whether an input statement can be used within a catch statement</p>
  
  <pre><code> import java.util.InputMismatchException;
   import java.util.Scanner;
   public class excep {
   public static void main(String args[]){
       int n;
       Scanner input=new Scanner(System.in);
       try{
           System.out.println("ENTER A NUMBER: ");
            n=input.nextInt();
       }
       catch(InputMismatchException e){
           System.out.println("ERROR!!! \nENTER A NUMBER :");
           n=input.nextInt();
       }
   }
   }
  </code></pre>