Java FileWriter class is used to write character-oriented data to a file. It is character-oriented class which is used for file handling in java.
public class FileWriter extends OutputStreamWriter
Creates a new file. It gets file name in string.
Creates a new file. It gets file name in File object.
It is used to write the string into FileWriter.
It is used to write the char into FileWriter.
It is used to check the two FilePermission objects for equality.
It is used to write char array into FileWriter.
It is used to flushes the data of FileWriter.
In this example, we are writing the data in the file testout.txt using Java FileWriter class.
Near fortis Hostipal