title: Scanner is skipping nextLine() after using next() or nextFoo()?
body: <p>I am using the <code>Scanner</code> methods <code>nextInt()</code> and <code>nextLine()</code> for reading input. </p>
  
  <p>It looks like this:</p>
  
  <pre><code>System.out.println("Enter numerical value");    
  int option;
  option = input.nextInt(); // Read numerical value from input
  System.out.println("Enter 1st string"); 
  String string1 = input.nextLine(); // Read 1st string (this is skipped)
  System.out.println("Enter 2nd string");
  String string2 = input.nextLine(); // Read 2nd string (this appears right after reading numerical value)
  </code></pre>
  
  <p>The problem is that after entering the numerical value, the first <code>input.nextLine()</code> is skipped and the second <code>input.nextLine()</code> is executed, so that my output looks like this:</p>
  
  <pre><code>Enter numerical value
  3   // This is my input
  Enter 1st string    // The program is supposed to stop here and wait for my input, but is skipped
  Enter 2nd string    // ...and this line is executed and waits for my input
  </code></pre>
  
  <p>I tested my application and it looks like the problem lies in using <code>input.nextInt()</code>. If I delete it, then both <code>string1 = input.nextLine()</code> and <code>string2 = input.nextLine()</code> are executed as I want them to be.</p>