title: Java user input nextLine() doesnt wait for input
body: <p>I have this small problem with my input :</p>
  
  <pre><code>public void input() 
  {
      Scanner scn = new Scanner( System.in );
      System.out.print( "Please enter id: " );
      id = scn.nextInt();
      System.out.print( "Please enter name: " );
      title = scn.nextLine();
      System.out.print( "Please enter author: " );
      author = scn.nextLine();
  }
  </code></pre>
  
  <p>Now I'm using <code>scn.nextLine()</code> because I want to have spaces when giving the name and the author like : </p>
  
  <pre><code>USER INPUT:
      Story of Something
      Sir Whatever
  </code></pre>
  
  <p>The problem is when I use <code>nextLine()</code> the program doesn't wait for my input, it just continues and my console will look like this:</p>
  
  <pre><code>Please enter id: 4632
  Please enter name: Please enter author: what, why??
  </code></pre>
  
  <p>Any way to fix this, please help?</p>