Abbey Workshop | ||||||||||
This short piece of code demonstrates how to write a text file in Java. The PrinterWriter class contains a number of methods for outputting text to a file. The FileWriter class is a convenience class for writing to a text file. It uses the default code page for the operating environment your virtual machine is running in. If you need to specify a specific code page, then you must use the OutputStreamWriter class instead.
Download source for: WriteText.java
Copyright © Abbey Workshop 2006