title: Variable might not be initialed
body: <pre><code>    while (a != true) {
              try {
                  input = user_input.nextInt();
  
                  calculate(input);
                  a = true;
              } catch (InputMismatchException ex) {
                  user_input.next();
                  System.out.println("fdsa");
              } catch (RangeException ex) {
              }
  
          }
  
          if (input == 1)
  </code></pre>
  
  <p>My problem is that i catch the exceptions i need which are if the input is &lt;1 and >4 or a string and i print the error messages and the program asks me again to input a number between 1 and 4 but when i started implementing the exceptions the input variable on my if says that it might not be initialized. It's my first time implementing exceptions and i m having a hard time.</p>
  
  <p>(edit)I solved the previous issue but i encountered a new unsolvable problem with scanner when i am typing an int between 1 and 4. This piece of my code is within another while loop which is currently infinite since it does not let me input again on the input=user_input.nextInt(); command and it is always repeating with the same value i initially typed. Thanks in advance and sorry for not posing my problem in a structured form.</p>