In part of my java program I read a sequence of inputs for the user.
Scanner in = new Scanner(System.in);
System.out.println();
System.out.print(\"Enter student
That's because after reading the int, the rest of the line (which is empty) is still unread and the next call to read nextline() will read the empty line.
So when
int studentNoParameter = in.nextInt();
is executed, you enter the int and you hit enter, which creates a '\n' as input. The next call:
in.nextLine();
continues to read the rest of the line after the int, which is empty, and it encounters '\n' and terminates.