Why does the line keyboard = new Scanner(keyboard.nextLine()); keep the program from hanging?
<p>I have been trying to figure out how to input multiple tokens at one time using the <code>Scanner</code> class.  I found some code that works perfectly.  I know that the <code>Scanner.hasNext</code> method can block indefinitely.  Why does the line <code>keyboard = new Scanner(keyboard.nextLine());</code> in this code keep it from doing this?</p>

<pre><code>    Scanner keyboard = new Scanner(System.in);
    LinkedList&lt;String&gt; ll = new LinkedList&lt;String&gt;();

    System.out.println("Please enter your full name: ");
    keyboard = new Scanner(keyboard.nextLine());

    while(keyboard.hasNext())
    {
        System.out.println("tag ");
        ll.add(keyboard.next());

    }

    System.out.println(ll);
</code></pre>

<p>Thanks!</p>
