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 & write binary data from a text file
Answer: Option B
Join The Discussion