2. Files & Exceptions Flashcards

1
Q

How do InputStream, InputStreamReader and BufferedReader differ?

A
  • InputStream has methods to read bytes
  • InputStreamReader extends InputStream and has methods to read characters
  • BufferedReader extends InputStreamReader and has methods to read lines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does FileReader differ from BufferedReader?

A
  • FileReader extends InputStreamReader, and has methods to read characters from a specified file
  • BufferedReader can read lines from a specified file using a FileReader
How well did you know this?
1
Not at all
2
3
4
5
Perfectly