Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Main {
- public static void main(String[] args) {
- FileOutputStream out = null;
- try {
- out = new FileOutputStream("out.txt");
- for(int x = System.in.read(); x != 88; x = System.in.read()) {
- out.write(x);
- }
- }
- catch (IOException ex) {
- System.out.println(ex);
- }
- finally {
- try {
- if(out != null)
- out.close();
- }
- catch (IOException ex) {
- System.out.println(ex);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement