copy - B boolean eof = false; int m=0; do{ m = in.read () ;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java .io .*; public class copy { public static void main ( String [] args ) { try { BufferedReader in = new BufferedReader ( new FileReader ("input.txt")); BufferedWriter bf = new BufferedWriter (new FileWriter ("output.txt"));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: B boolean eof = false; int m=0; do{ m = in.read () ; if(m !=-1){ i bf. write(m); } else eof=true; }while(!eof); in. close (); bf.close(); } catch ( IOException e) { e. printStackTrace (); } } }...
View Full Document

Ask a homework question - tutors are online