Stop show with sound -- Keyboard shortcut: 'x'  Next slide in show -- Keyboard shortcut: 'n'  2 minutes, 23 secondsCollections og streams - slide 31 : 35

Eksempel på anvendelse af klasserne FileReader og FileWriter 

import java.io.*;

public class Copy {
    public static void main(String[] args) throws IOException {

        FileReader in = new FileReader(new File(args[0]));
        FileWriter out = new FileWriter(new File(args[1]));
        int c;

        do{
          c = in.read();
          if(c != -1) out.write(c);
        } while (c != -1);  

        in.close();
        out.close();
    }
}