Section 15.4 Sequential-Access Text Files

• Java imposes no structure on a file. You must structure files to meet your application’s needs.

• To retrieve data sequentially from a file, programs normally start from the beginning of the file and read all the data consecutively until the desired information is found.

• Data in many sequential files cannot be modified without the risk of destroying other data in the file. Records in a sequential-access file are usually updated by rewriting the entire file.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.