FileWriter fWriter = new FileWriter("filecopy.txt"); if you want copy one file to another file, refer to the following:import java.io.*;public class Copy {
    public static void main(String[] args) throws IOException {
File inputFile = new File("file.txt");
File outputFile = new File("filecopy.txt");        FileReader in = new FileReader(inputFile);
        FileWriter out = new FileWriter(outputFile);
        int c;        while ((c = in.read()) != -1)
           out.write(c);        in.close();
        out.close();
    }
}