Asked by Phillip Wagner on Sep 28, 2024

The method __________ from the File class forces a physical write to the file of any data that is buffered.

A) close)
B) flush)
C) writeUTF)
D) writeObject)

WriteUTF

A method in Java for writing a string to an output stream in a modified UTF-8 format.

Flush

To flush means to clear a buffer in computing, forcing any buffered but not yet written data to be written to its destination, such as a file or a network.

File Class

In programming, specifically Java, the File class is a representation of file and directory pathnames, providing methods to manipulate these paths.

  • Comprehend and implement Java classes and methods dedicated to file and stream operations.
  • Understand the function and usage of different file classes in Java.