Why is this loop not printing the last line in the .txt file that I have saved elsewhere? It prints out all the lines except the very last one.
int count = 0;
Courses[] POS = new Courses[26];
while (scan.hasNext())
{
POS[count] = new Courses(scan.nextLine());
System.out.println(POS[count]);
scan.nextLine();
count++;
}
nextLine()twice?