What is the difference between .nextLine() and .next()? : <p>I am making a program and am using user input. When I am getting a String I have always used .nextLine(), but I have also used .next() and it does the same thing. What is the difference? </p>

<pre><code>Scanner input = new Scanner(System.in);
String h = input.nextLine();
String n = input.next();
</code></pre>

<p>What is the difference? </p>
