//File: HelloArgs.java import java.io.*; class HelloArgs { public static void main (String [] args) throws IOException { // Don't need to ask the user for file name. // System.out.print ("What's the name of your file? "); // String fileName = Keyboard.readString(); //FileWriters convert char streams to byte streams FileWriter fr = new FileWriter (args[0]); //Pass the filename through the command line argument //PrintWriters convert Strings to char streams PrintWriter outFile = new PrintWriter (fr); outFile.println ("Hi there gang!!. Ain't this great?"); outFile.close(); } }