Which of the following classes are byte stream classes in Java?
- FileInputStream and FileOutputStream
- FileInputStream and Reader
- FileReader and FileOutputStream
- FileReader and Writer
Byte stream classes in Java are used for handling binary data. The correct options are FileInputStream and FileOutputStream, as they are used to read and write binary data to files. FileReader and Reader are character stream classes used for reading text data, not binary data.
Loading...
Related Quiz
- In which scenario would you choose an abstract class over an interface?
- You are given the task to refactor a long series of if-else-if conditions that check for various states of an object. The code is hard to read and maintain. What would be an efficient way to refactor this using modern Java features?
- When would you prefer byte streams over character streams while performing I/O operations in Java?
- Imagine you are developing a real-time multiplayer online game where player data needs to be synchronized. What strategy and technology would you choose for networking communication?
- What will be the output of the executeQuery() method in JDBC?