go to previous page   go to home page   go to next page highlighting

Answer:

Closing a file asks the system to finish all activity with the file and to ensure that it is safely on the disk.


Closing a File

Office File

Computer terms often come from office practice of past decades. Computer files are like the paper files used in offices. Closing a file means gathering up everything that should go into it and filing it away.

Use the close() method when a program is done with a file. If you don't, the program might stop running before the operating system has finished writing data to the file. The data written to the file might be lost!

Or it might not, depending on how busy the operating system is. This is a notorious computer bug! It can be very frustrating, because sometimes a buggy program will work correctly, and sometimes not.


QUESTION 4:

Must the disk file used with Scanner be a text file?


go to previous page   go to home page   go to next page