import java.io.*; /** * This code illustrates the use of PrintWriter * @author e. adams * */ public class Lecture6_7 { public static void main (String args []) { PrintWriter myPrintWriter; try { myPrintWriter = new PrintWriter ("filename.txt "); } catch (IOException e) { System.out.println (" couldn’t open file "); } } }