Java How to get scanner.nextLine() on the same line?
<p>I have a program that takes input from the user from the command line.  Annoyingly the first time I use the scanner the inputted text goes on the next line (after the <code>System.out.println</code>).  However, all the other times it is on the same line as the <code>System.out.println</code>.</p>

<p>Code:</p>

<pre><code>//Create a scanner
Scanner input = new Scanner(System.in);

//Gets type
System.out.println("--Television Show or Film (t or f): ");
String type = input.nextLine();
input.close();
</code></pre>

<p>Output:</p>

<pre><code>--Television Show or Film (t or f): 
t
</code></pre>

<p>Desierd Output:</p>

<pre><code>--Television Show or Film (t or f): t
</code></pre>

<p>Any help is appreciated. Also, I'm using Eclipse Console.</p>