Reading a file line by line: the file on disk, the reader that opens it, the buffer that makes it efficient, and your readLine() loop.
Opens the file and reads one character at a time. Works, but each character trip to the disk is slow.
Wraps a FileReader. Pulls a block of characters into memory at once, then hands them to you line by line with readLine().
Keep calling readLine() until it returns null. That means end-of-file — stop reading and close().
Tip: use Next step to walk through each readLine(), or press Auto-play to watch the loop run. Notice how readLine() returns null at end-of-file — that's what stops the loop.