What is the purpose of the `PrintWriter` class in Java?
A. It is used to read binary data from a file
B. It is used to write formatted text to a file
C. It is used to read text from the keyboard
D. It is used to read & write binary data from a file
Answer: Option B
Join The Discussion