Home » questions » displaying output to a text file in java?
displaying output to a text file in java?
is there a way to display output to a text file in java. For example i have two variables (both strings) and i want to print them to a text file. any suggestions. below is what i have tried using but i'm getting errors.
java.io.File outfile;
java.io.PrintWriter pen;
outfile = new java.io.File("ask.txt");
pen = new java.io.PrintWriter(outfile);
outfile.println(time + date);

Answers
fuzzhead
On 2006-08-15 09:58:28