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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is a stream?

A

A stream is an object that allows for flow of data between your program and other files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To write to a text file, use

A

Printwriter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To read a text file, use

A

Scanner or BufferedReader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly