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
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