Hi I wrote this but not sure how to get it to add to the new.txt is there a way to do that.

import java.io.*;

public class Copy
{
public static void main(String[] args) throws IOException
{
File inputFile = new File("test.txt");
File outputFile = new File("new.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();
}
}

just not to sure if it can be done or if the book I'm looking at has that info. Thanks