AP® Computer Science A glossary

Text file

Also called: file

Course: AP® Computer Science A Shows up in: Unit 4: Data Collections

Storage for data, as readable text, that persists when the program is not running and can be read while the program runs.

Appears in the course and exam description (CED): 4.6.A.14.6.A.94.6.A.10

A program reads a text file by connecting a File object to a Scanner, reading in a while (input.hasNext()) loop, and calling close() at the end. Values are separated by whitespace or by a character such as a comma.

Learn it properly, with a checkpoint 4.6 Using Text Files

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure