//File: Hello.java import java.io.*; import iostuff.*; class Hello { public static void main (String [] args) { System.out.print ("What's the name of your file? "); String fileName = Keyboard.readString(); try { //FileWriters convert char streams to byte streams FileWriter fr = new FileWriter (fileName); //PrintWriters convert Strings to char streams PrintWriter out = new PrintWriter (fr); out.println ("Hi there gang!!. Ain't this great?"); out.close(); //NOTE: It's important to close output files // after completing output. // Otherwise, you can lose some or all // of your data. } catch (IOException e) { } } }