Which method is used to write characters to a file in Java?

  • append()
  • println()
  • read()
  • write()
To write characters to a file in Java, you typically use the write() method, which is available in classes like FileWriter and BufferedWriter. It allows you to write characters as a sequence of bytes to the file. The other options, such as read(), append(), and println(), are not primarily used for writing characters to a file.
Add your answer
Loading...

Leave a comment

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