Class Notes (835,007)
Canada (508,866)
COMP 249 (41)
Nagi Basha (40)
Lecture 13

COMP 249 Lecture 13: FileIO7

2 Pages
Unlock Document

Computer Sci.
COMP 249
Nagi Basha

This program illustrates input and output files further. The program shows how a file can be copied through the input and output classes. Does this program really work? Why? import java.util.Scanner; import; import; import; import; public class FileIO7{ // A method that the names of an input and output files (as streams) // then copies the input file to the output file public static void fileCopy(Scanner inFileStreamName, PrintWriter outFileStreamName) { // Read line by line from input file and copy it to output file ; s g n i r t S while(inFileStreamName.hasNextLine()) { ; ) ( e n i L t x e n . e m a N m a e r t S e l i F n i = s ; ) s ( n l t n i r p . e m a N m a e r t S e l i F t u o } } public static void main(String[] args) { ; 2 s , 1 s g n i r t S PrintWriter pw = null; = b k r e n n a c S new Scanner(;
More Less

Related notes for COMP 249

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.