posted 19 years ago
The file that the book is talking about consists of records. There is, ofcourse, a finite number of records in the file. Normally, the file ends after the last record. The method returns false if the end of the file has been reached and there are no more records to read (this is the normal, expected end-of-file situation).
However, something could be wrong with the file. If the file ends in the middle of a record, then something is wrong. In a normal situation, this is not what's supposed to happen, so it's an unexpected end-of-file. In that case the method throws an exception, to indicate that something is wrong.