Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.io.FileReader;
  4. import java.io.FileWriter;
  5. import java.io.IOException;
  6.  
  7. public class Main {
  8.  
  9. public static void main(String[] args) throws IOException {
  10. {
  11. FileReader in = null;
  12. FileWriter out = null;
  13. try {
  14. in = new FileReader("input.txt");
  15. out = new FileWriter("output.txt");
  16. int c;
  17. while
  18. ((c = in.read()) != -1) {
  19. out.write(c);
  20. }
  21. } finally {
  22. if (in != null) in.close();
  23.  
  24. if (out != null) out.close();
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement