/** * Write a description of class Driver here. * * @author John Paxton * @version 1.0 */ import java.io.BufferedReader; import java.io.FileReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; import java.io.FileWriter; public class Driver { /** * @throws FileNotFoundException occurs when the file to be opened isn't there * @throws IOException something strange occurred during reading the file */ public static void main (String [] args) throws FileNotFoundException, IOException { BufferedReader inputFile; PrintWriter outputFile; String currentLine = "invalid"; inputFile = new BufferedReader (new FileReader ( "birthday.txt" )); outputFile = new PrintWriter (new FileWriter ("sample.txt")); currentLine = inputFile.readLine(); while (currentLine != null ) { System.out.println(currentLine); outputFile.println(currentLine); currentLine = inputFile.readLine(); } inputFile.close(); outputFile.close(); } }