title: Java:Handling Exception and cant able to input value
body: <pre><code>package scheme;
  
  import java.math.BigDecimal;
  
  import java.util.Scanner;
  
  public class EnterSchemeDetails {
  
      private Scanner sc;
  public static void main(String []args){
      EnterSchemeDetails schemes=new EnterSchemeDetails();
      schemes.add();
  }
  public void add() {
      NewEntry newEntry = new NewEntry();
      String newOne = "newrecord";
      sc = new Scanner(System.in);
  
      System.out.println("Enter No of Times ");
      int no = sc.nextInt();
      for (int i = 1; i &lt;= no; i++) {
          System.out.println("Enter Scheme " + i);
          gettingSchemeDetails(newOne, newEntry);
      }
      boolean condition = displayOption(newEntry);
      if (condition) {
          System.out.println("Stopped Working");
      } else {
          System.out.println("Wrong Input Specify Numeric value ");
          displayOption(newEntry);
      }
  
  }
  
      public boolean displayOption(NewEntry newEntry) {
  
          String newOne = null;
          System.out.println("Enter Option ");
          System.out
                  .println("1.Display \t 2.Insert \t 3.Update \t 4.Delete \t 5.Exit");
          int option = 0;
          try {
              option = sc.nextInt();
  
              while (option != 5) {
  
                  if (option == 1) {
                      newEntry.display();
                  } else if (option == 2) {
                      newOne = "insert";
                      gettingSchemeDetails(newOne, newEntry);
                  } else if (option == 3) {
                      newOne = "update";
                      gettingSchemeDetails(newOne, newEntry);
  
                  } else if (option == 4) {
                      System.out.println("Enter Scheme No to Delete");
                      int schemeNo = sc.nextInt();
                      boolean check = newEntry.deleteOperation(schemeNo);
                      if (check) {
                          System.out.println("Deleted Successfully");
                      } else {
                          System.out.println("No such Record Found");
                      }
  
                  } else if (option == 5) {
                      System.out.println("Stopped");
                  } else {
                      System.out.println("Invalid Option");
                  }
  
                  System.out.println("Enter Option ");
                  System.out
                          .println("1.Display \t 2.Insert \t 3.Update \t 4.Delete \t 5.Exit");
  
                  option = sc.nextInt();
  
              }
          } catch (Exception e) {
              return false;
          }
          return true;
      }
  
  
      public void gettingSchemeDetails(String newOne, NewEntry newEntry) {
          sc = new Scanner(System.in);
          int schemeNo = 0;
          if (newOne == "update") {
              System.out.println("Enter Scheme No to Update");
              try {
                  schemeNo = sc.nextInt();
                  boolean check = newEntry.checkSchemeNo(schemeNo);
                  if (check == false) {
                      System.out.println("NO such record found");
                      displayOption(newEntry);
                  }
              } catch (Exception e) {
                  System.out.println("Invalid Option");
                  displayOption(newEntry);
  
              }
  
          }
          SchemeInfo bean = new SchemeInfo();
  
          System.out.println("Enter Scheme Name :");
          bean.setSchemeName(sc.next());
          System.out.println("Enter Fund Name :");
          bean.setFundName(sc.next());
          gettingNavDate(bean);
          try {
              gettingNavAmount(bean);
          } catch (Exception e) {
              System.out.println("Input Mismatch enter Numeric value");
              gettingNavAmount(bean);
          }
          try {
              gettingNavUnits(bean);
          } catch (Exception e) {
              System.out.println("Input Mismatch enter Numeric value");
              gettingNavUnits(bean);
          }
  
          gettingCategories(bean);
          if (newOne != "update") {
              newEntry.newRecord(bean);
          } else {
              newEntry.update(schemeNo, bean);
          }
      }
  
      public void gettingNavDate(SchemeInfo bean) {
          sc = new Scanner(System.in);
          System.out.println("Enter Nav Date :");
          String navDate = sc.next();
  
          boolean check = NavDateCheck.checkDateFormat(navDate);
          if (check == true) {
              bean.setNavDate(navDate);
  
          } else {
              System.out
                      .println("Incorrect Date Format..Please Enter Correct Date Format Ex.YYYY-MM-DD");
              gettingNavDate(bean);
          }
  
      }
  
      public void gettingNavAmount(SchemeInfo bean) {
          sc = new Scanner(System.in);
          System.out.println("Enter Schmene Nav Amount :");
          BigDecimal navAmount = new BigDecimal("0");
          navAmount = sc.nextBigDecimal();
  
          boolean check1 = NavDateCheck.checkNavAmount(navAmount);
          if (check1 == true) {
              bean.setNavAmount(navAmount);
  
          } else {
              System.out
                      .println("Incorrect NavAmount.Enter Correct Nav Amount.Ex.1000.21 ");
              gettingNavAmount(bean);
          }
  
      }
  
      public void gettingNavUnits(SchemeInfo bean) {
          sc = new Scanner(System.in);
          System.out.println("Enter Nav Units :");
          BigDecimal navUnits = new BigDecimal("00");
  
          navUnits = sc.nextBigDecimal();
  
          boolean check2 = NavDateCheck.checkNavUnits(navUnits);
          if (check2 == true) {
              bean.setNavUnits(navUnits);
  
          } else {
              System.out
                      .println("Incorrect Nav Units.Enter Correct NavUnits Ex.");
              gettingNavUnits(bean);
          }
      }
  
      public void gettingCategories(SchemeInfo bean) {
          sc = new Scanner(System.in);
  
          System.out.println("Enter Divident Option :");
          bean.setDividentOption(sc.next());
          System.out.println("Enter Scheme Plan Name ");
          bean.setSchemePlanName(sc.next());
          System.out.println("Enter Scheme Category ");
          bean.setSchemeCategory(sc.next());
          System.out.println("Enter Scheme Subcategory");
          bean.setSchemeSubcategory(sc.next());
  
      }
  
  }
  </code></pre>
  
  <p>I have 2 problems in my code
  1.when giving characters/string(other than number) it will throw an exception and i have handled the exception.But second time i cant able to give user input to that option</p>
  
  <p>Enter No of Times 
  1
  Enter Scheme 1
  Enter Scheme Name :
  SchemeSample
  Enter Fund Name :
  FundSample
  Enter Nav Date :
  1234-12-1
  Enter Schmene Nav Amount :
  17826
  Enter Nav Units :
  7328736
  Enter Divident Option :
  SampleDivident
  Enter Scheme Plan Name 
  SamplePlaan
  Enter Scheme Category 
  SampleCategory
  Enter Scheme Subcategory
  SampleSubCategory
  Enter Option 
  1.Display    2.Insert    3.Update    4.Delete    5.Exit
  f
  Wrong Input Specify Numeric value 
  Enter Option 
  1.Display    2.Insert    3.Update    4.Delete    5.Exit</p>