Skip to content
Advertisement

Tag: printstream

Java PrintStream .println() method not outputting to file?

I am trying to write a method which recursively gathers data from files, and writes erroneous data to an error file. See code block: However, the error file is always blank. I’ve tried calling the .flush() and .close() methods. System.err is outputting so I know the code is being run. I’ve tried instantiating the PrintStream outside of the try-with-resources, no

Advertisement