The Java FileWriter class supports various constructors as listed below: Constructors Description FileWriter(File file) Creates a FileWriter object using the specified File FileWriter(FileDescriptor fd) Creates a FileWriter object using the specified FileDescriptor FileWriter(String fileName) Creates a FileWriter object using the specified fileName FileWriter(File file, Boolean append) Creates a FileWriter using the specified file. The java.io package includes the FileWriter class It extends the OutputStream class and writes a stream of characters.
How to write to a file in java? – FileWriter in Java is a class that we use to write data in the form of characters to a file.
Append data in File using Java FileWriter.Write a single character and string in a File.