title: "hasNextInt" does not detect subsequent input; where to put "nextLine"?
body: <p>I am brand new at Java and this one is throwing me. Using the below code it loops through for the first question until I enter anything but an integer but after finishing that loop it does not stop for the remaining question.</p>
  
  <p>Through a bit of research and reading I have found that I need to use the in.nextLine() to eat the newline character after the input. However no matter where I place the nextLine() it doesn't work? I thought it would be after the first int input = in.nextInt(); line but that did not work. Any help on where it would go and why?</p>
  
  <pre><code>System.out.print("How many CUs per course are remaining in your degree program? Enter any letter to quit: ");
  while (in.hasNextInt()) { // Verify input is an integer
      int input = in.nextInt();
      if (input &lt;= 0) // Verify that input is not negative or zero
      {
          System.out.println("Please enter a positive number or any letter to quit");
          System.out.print("Add another course or any letter to quit: ");
      } else {
          courseCuList.add(input);
          System.out.print("Add another course or any letter to quit: ");
      }
  }
  System.out.print("How many CUs do you plan to take per term?");
  while (in.hasNextInt()) {
      int input = in.nextInt();
      // in.nextLine(); This line consumes the \n
      if (input &lt;= 0) {
          System.out.println("Please enter a whole positive number.");
          System.out.println("How many CUs do you plan to take per term?");
      } else {
          cuPerTerm = in.nextInt();
      }
  }
  </code></pre>