title: Scanner issue when using nextLine after nextXXX
body: <p>I've faced an issue when I'm trying to get the user input using <code>Scanner</code>:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Main
  {
      public static Scanner input = new Scanner(System.in);
      public static void main(String[] args)
      {
          System.out.print("Insert a number: ");
          int number = input.nextInt();
          System.out.print("Text1: ");
          String text1 = input.nextLine();
          System.out.print("Text2: ");
          String text2 = input.nextLine();
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Insert a number: 55
  Text1: Text2: Hi there!
  </code></pre>
  
  <p>As you can see, the program skipped <code>String text1 = input.nextLine();</code>. What is the problem here? and how to solve this issue?</p>