A tutorial on writing text files, Java 7 style. If you want Java 6 style, you can easily take the code here and re-arrange it along the lines of the previous tutorial on reading text files in Java. Writing text files requires the same kind of Russian doll approach that reading them does, unfortunately, but at least you can simplify the code a lot using the try-with-resources syntax that Java 7 introduced.
When the video is running, click the maximize button in the lower-right-hand corner to make it full screen. Don't forget to change to HD also if the video appears fuzzy.
Code for this tutorial: