Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.io.*;
- public class Filetest {
- static Scanner UserInput = new Scanner(System.in);
- public static void main(String[] args) throws IOException {
- BufferedReader newtext = new BufferedReader(new FileReader("C:\\Users\\Fintan\\workspace\\File writer\\Tester.txt"));
- Writer output = null;
- String filename = "Tester.txt";
- output = new BufferedWriter(new FileWriter(filename, true));
- newtext.readLine();
- String r = UserInput.nextLine();
- output.write("\r\n");
- output.write(r);
- output.close();
- }
- }
Add Comment
Please, Sign In to add comment