To write primitive data types like int or double to a file in a machine-independent way, you might use ________.

  • DataOutputStream
  • FileInputStream
  • ObjectInputStream
  • ObjectOutputStream
To write primitive data types to a file in a machine-independent way, you can use DataOutputStream. It provides methods for writing different data types to a file while ensuring that the data can be read back correctly.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *