(Java) nextLine() skipped in runtime, while working previously
<p>In part of my java program I read a sequence of inputs for the user.</p>

<pre><code>Scanner in = new Scanner(System.in);
System.out.println();
System.out.print("Enter student name: ");
String nameParameter = in.nextLine();
System.out.print("Enter student number: ");
int studentNoParameter = in.nextInt();
System.out.print("Enter subject: ");
String subjectParameter = in.nextLine();
System.out.print("Enter level: ");
int levelParameter = in.nextInt();
int[] resultsParameter;
resultsParameter = new int[3];
System.out.println("Enter results (0 if not taken yet)...");
System.out.print("First year: ");
resultsParameter[0] = in.nextInt();
System.out.print("Second year: ");
resultsParameter[1] = in.nextInt();
System.out.print("Third year: ");
resultsParameter[2] = in.nextInt();
System.out.println();
</code></pre>

<p>The program compiles, however the line:</p>

<pre><code>String subjectParameter = in.nextLine();
</code></pre>

<p>after the prompt to enter Subject, is seemingly skipped in runtime.</p>

<p>Instead of my output being:</p>

<p>Enter Subject: [User Input]</p>

<p>Enter Level: [User Input]</p>

<p>It comes out as:</p>

<p>Enter Subject: Enter Level: [User Input]</p>

<p>The following input is assigned to levelParameter, and an error results if you input something other than an integer, so it seems that the line of code has simply been skipped.</p>

<p>I'm very much a java novice and I'm rather confused. I know this is going to turn out to be something really simple and silly in the end though. Thank you in advance for your time.</p>
