Yes.
Now look at the openFiles() method. It will open a BufferedReader stream with the source file and a PrintWriter with the destination file.
openFiles()
BufferedReader
PrintWriter
class CopyMaker { String sourceName, destName; BufferedReader source; PrintWriter dest; String line; private boolean openFiles() // return true if files open, else false { // open the source try { source = new (new FileReader( sourceName )); } catch ( iox ) { System.out.println("Problem opening " + sourceName ); return false; } // open the destination try { dest = new PrintWriter( new (new FileWriter( destName )) ); } catch ( iox ) { System.out.println("Problem opening " + destName ); return false; } return ; } }
Click in the blanks.