Question: how to copy data from one text file to another in java?
Answer: import java. io. BufferedReader;
import java. io. FileReader;
import java. io. FileWriter;
import java. io. IOException;
public class FileCopyExample {
public static void main(String[] args) {
try {
FileReader fr = new FileReader("input.txt");