Advertisement
Josif_tepe

Untitled

Mar 23rd, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. import java.io.*;
  2. public class Main {
  3.  
  4.     public static void main(String[] args) {
  5.         try {
  6.             FileInputStream in = new FileInputStream("in.txt");
  7.             while(true) {
  8.                 int x = in.read();
  9.                 if(x == -1) {
  10.                     break;
  11.                 }
  12.                 System.out.write(x);
  13.             }
  14.  
  15.         }
  16.         catch (IOException ex) {
  17.             System.out.println(ex);
  18.         }
  19.     System.out.flush();
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement