In JavaSW, there are a multitude of ways to write a String to a File. Perhaps the cleanest, most succinct solution to write a String to a File is through the use of the FileWriter. With this class, you pass its constructor the File object that you'd like to write to, and then you call its write method to write strings of data to the file. When done, you can flush and close the FileWriter, and you're done. In the example below, the WriteStringToFile1 class writes "This is a test" to a file called "test1.txt".