11. Which class is used to write binary data to a file in Java? A. `InputStream` B. `BufferedReader` C. `FileOutputStream` D. `FileReader` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
12. In Java, which method is used to write binary data to a file? A. `read()` B. `print()` C. `scan()` D. `write()` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
13. What is the purpose of the `FileWriter` class in Java? A. It is used to write character data to a file B. It is used to read character data from a file C. It is used to write binary data to a file D. It is used to read binary data from a file Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
14. Which class is used to write formatted text to a file in Java? A. `OutputStream` B. `BufferedWriter` C. `Scanner` D. `PrintWriter` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
15. In Java, what is the primary purpose of the `DataInputStream` class? A. It is used to read text data from a file B. It is used to write binary data to a file C. It is used to read primitive data types from an input stream D. It is used to perform mathematical operations Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
16. In Java, what does the `DataOutputStream` class do? A. It is used to read binary data from a file B. It is used to write primitive data types to an output stream C. It is used to read data from the keyboard D. It is used to read binary data from a file Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
17. Which class is used to write primitive data types to an output stream in Java? A. `FileReader` B. `FileWriter` C. `DataOutputStream` D. `DataInputStream` Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
18. What is the purpose of the `RandomAccessFile` class in Java? A. It is used to read data from the keyboard B. It is used to write data to a file C. It is used to perform mathematical operations D. It allows reading and writing at random positions in a file Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
19. In Java, which class is used to read and write character streams? A. `Reader` and `Writer` classes B. `InputStream` and `OutputStream` classes C. `BufferedReader` and `PrintWriter` classes D. `DataInputStream` and `DataOutputStream` classes Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
20. What is the primary purpose of the `File` class in Java? A. It is used to perform mathematical operations B. It is used to write data to a file C. It is used to read data from a file D. It represents a file or directory pathname Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board