title: Why does Java ask me to hit Enter again?
body: <p>I've been racking my brain for a while trying to understand how Scanner works. So here's the code:</p>
  
  <pre><code>Scanner sc = new Scanner(System.in);
  String s = sc.nextLine();
  String p = sc.nextLine();
  System.out.println(s);
  System.out.println(p);
  System.out.println(sc.hasNextLine());
  </code></pre>
  
  <p>What I <strong>expect</strong>:</p>
  
  <pre><code>Love is good  &lt;- press ENTER
  Love is blind &lt;- press ENTER
  Love is good  &lt;- output
  Love is blind &lt;- output
  false
  </code></pre>
  
  <p>What I <strong>have</strong>:</p>
  
  <pre><code>Love is good   &lt;- I press ENTER
  Love is blind  &lt;- I press ENTER
  Love is good   &lt;- output
  Love is blind  &lt;- output
  &lt;- press ENTER
  true &lt;- output
  </code></pre>
  
  <p>What I <strong>do not understand</strong>:</p>
  
  <ol>
  <li>Instead of immediate printing this line - System.out.println(sc.hasNextLine()); - it makes me to press ENTER again</li>
  <li>It prints true instead of false while there no more lines or symbols</li>
  </ol>
  
  <p>What I <strong>have read</strong>: I <em>have</em> read a dozen of stackoverflow answers about using hasNextLine() after nextInt() and about how nextInt() does not consume the final symbol in the line but I don't understand why, even though I don't use nextInt() in here, I still need to press ENTER one more time and why hasNextLine() is true.</p>