I have a while loop (shown below) that continually reads from a file until EOF is reached. I am supposed to write a loop invariant for any non-trivial loop. Is this a trivial loop? If not, what would be a loop invariant for this while loop? I have never written invariants before.
while (line != null) {
System.out.println(line);
line = reader.readLine();
}