File I/O Flashcards
1
Q
File input and output
A
Programs need a way of communicating with files outside of the program. The means of communication are input and output.
2
Q
what is a stream?
A
A stream is an object that allows for flow of data between your program and other files.
3
Q
To write to a text file, use
A
Printwriter
4
Q
To read a text file, use
A
Scanner or BufferedReader
5
Q
Binary vs text format
A
text formats are readable to humans, but can only handle ASCII values. Binary formats can handle all unicode characters, and can make a program run faster because your program won’t have to translate.