title: Java Max and Min Integer value error message output
body: <p>I am working with Java and attempting to add a statement in this code that displays an error message, outside the:</p>
  
  <pre><code>Exception in thread "main" java.util.InputMismatchException: For input string: 
  
  "31243241234123423"
      at java.util.Scanner.nextInt(Scanner.java:2123)
      at java.util.Scanner.nextInt(Scanner.java:2076)
      at MaxInteger.main(MaxInteger.java:22)
  </code></pre>
  
  <p>error message that Java provides. I am looking to add:</p>
  
  <pre><code>System.out.println("Your Integer value is out of range.");
  </code></pre>
  
  <p>This is the portion of the code that I am trying to add it to:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Homework1a {
      public static void main(String[] args) {
  
          int intOne = 0;
          int intTwo = 0;
          String operation = " ";
          int result = 0;
          double divResult = 0.0;
  
          // Use the Scanner class to input data
          Scanner scannerIn = new Scanner(System.in);
  
          // Display of Program Introduction
          System.out.println("This program will take your integer inputs, " +
                              "along with the choosen operation and calculate the results");
  
          // Display for user to input the first integer
          System.out.println("Enter the first integer:");
              intOne = scannerIn.nextInt();
  
          // Display for user to input the second integer
          System.out.println("Enter the second integer:");
              intTwo = scannerIn.nextInt();
  
          // Display a list of instructions on the proper call for the operator
          System.out.println("");
          System.out.println("********** Operator Instructions **********");
          System.out.println("\t For addition use +");
          System.out.println("\t For subtraction use -"); 
          System.out.println("\t For multiplication use *");  
          System.out.println("\t For division use /");
          System.out.println("\t For modulus use %");
          System.out.println("\t For bitwise AND use &amp;");
          System.out.println("\t For bitwise inclusive OR use |");
          System.out.println("********************************************");
          System.out.println("");
  
          // Takes care of the ENTER key negating the String input below
          scannerIn.nextLine();
  
          // Display for user to input the chosen operator
          System.out.println("Enter the operation:");
              operation = scannerIn.nextLine();
      }
  }
  </code></pre>
  
  <p>The other instance I am trying to incorporate is when the addition, subtraction, multiplication result exceeds the max integer value display a similar prompt. Any suggestions or furthering questions?</p>