View Problem

Append to a file

ExpandDiskEdit
java
FileWriter fw = null;

try
{
fw = new FileWriter("test.txt", true);
fw.write("This line appended to file!");
}
ExpandDiskEdit
java
PrintWriter pw = null;

try
{
pw = new PrintWriter(new BufferedWriter(new FileWriter("test.txt", true)));
pw.print("This line appended to file!");
}
DiskEdit
csharp .Net 2.0 or later
System.IO.File.AppendAllText("filename.txt", "Some text to append to the file");
ExpandDiskEdit
clojure
(with-out-append-writer "output.txt" (println "This is appended to the file"))

Submit a new solution for java, csharp, or clojure
There are 13 other solutions in additional languages (cpp, erlang, fantom, fsharp ...)