title: Scanner in java STDIN nextLine()
body: <p>Our professor has us doing a lab to parse strings. He refuses to let us use files and says if he copy and paste a paragraph of strings we have to parse it. My problem is I'm not sure how to get the data from STD when copy and paste (I could do this with a file much easier).</p>
  
  <pre><code>public static void main(String[] args)
    {
      Scanner finput;
      String input;
      System.out.println("Enter Data: ");
      finput = new Scanner(System.in);
  
      input = finput.nextLine();
              System.out.println("OUTPUT")
      System.out.println(input);
      System.out.println(input.length());
      while(finput.hasNextLine())
      {
          input = finput.nextLine();
          System.out.println(input);
      }
    }
  </code></pre>
  
  <p>This is what I got so far my only problem is when I Copy and paste a paragraph into the console (using eclipse) it will not grab the last line unless I hit enter. If I type something again and press enter the previous line is concatenated with the new entry like below. </p>
  
  <pre><code>Enter Data:
  FirstLine
  SecondLineOUTPUT
  FirstLine
  junk
  SecondLinejunk
  </code></pre>
  
  <p>If the input was just single line by line I wouldn't be having this problem and I'm also not sure why if I copy paste it doesn't require me to hit enter to progress....</p>