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.