I had a very simple request, I have a full code that sorts through an input file and outputs the merged strings properly into the console. My question is can I take this already perfect output from my CONSOLE and simply output it into a seperate .txt fle as well?
I've tried doing a simple PrintStream printStream = new PrintStream(new FileOutputStream("output.txt")); System.setOut(printStream);
it does create my output.txt file, but it's always empty?