package tio; import java.io.*; /** * The class PrintFileWriter is a * convenience class. It adds one constructor to its * parent class, PrintWriter. This new constructor * takes the name of a file. *

* new PrintFileWriter(fileName) is the * same as * new PrintWriter(new FileWriter(fileName)) * . */ public class PrintFileWriter extends PrintWriter { public PrintFileWriter(String filename) throws IOException { super(new FileWriter(filename)); } }