I have this code
public class program { public static void main(String[] args) { try { String filePath = (args[0]); String st
Don't create a new PrintStream in each loop. Instead create the PrintStream prior to the while loop:
PrintStream
PrintStream out = new PrintStream( ... ); while ((strLine = br.readLine()) != null) { out.print(strLine); }