Home / Questions / Which streams are used for performing IO in (a) text files and (b) binary files?
Explanatory Question

Which streams are used for performing IO in (a) text files and (b) binary files?

👁 2 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

(a) For text files, use FileReader, FileWriter, BufferedReader, BufferedWriter, and PrintWriter. (b) For binary files, use FileInputStream, FileOutputStream, DataInputStream, and DataOutputStream.