title: Why is nextLine() returning an empty string?
body: <p>This is probably one of the easiest things but I'm not seeing what I'm doing wrong.</p>
  
  <p>My input consist of one first line with a number (the number of lines to read), a bunch of lines with data and a final line only with  \n. I should process this input and after the last line, do some work.</p>
  
  <p>I have this input:</p>
  
  <pre><code>5
  test1
  test2
  test3
  test4
  test5
        /*this is a \n*/
  </code></pre>
  
  <p>And for reading the input I have this code.</p>
  
  <pre><code>int numberRegisters;
  String line;
  
  Scanner readInput = new Scanner(System.in);
  
  numberRegisters = readInput.nextInt();
  
  while (!(line = readInput.nextLine()).isEmpty()) {
      System.out.println(line + "&lt;");
  }
  </code></pre>
  
  <p>My question is why I'm not printing anything? Program reads the first line and then does nothing.</p>