I have the following code however when I am reading from an input, the input is not being read correctly. The input is two lines of code however the first line isn't being read correctly if it is too large (1 million characters)
package usaco;
import java.io.*;
import java.util.*;
public class Censoring {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader(("C:/Users/Eric Gan/workspace/12in.txt")));
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("C:/Users/Eric Gan/workspace/myout.txt")));
String input = br.readLine();
String censor = br.readLine();
br.close();
pw.println(input);
pw.close();
System.out.println(input);
System.out.println(censor);
while(input.contains(censor))
{
input = input.replace(censor, "");
}
}
}