Adding print streams
Hello, im working on a program, however i have a need to have 2 print streams and i wish to add the contents of one to another
The problem is i cant declare writer 2 without giving it a file url the same as newwriter, so basically i end up with 2 files when i only really want one, but it is required of me to maintain both streams. Any ideas?
private static PrintStream newwriter;
private static PrintStream writer2;
newwriter = new PrintStream("test.txt");
writer2 = new PrintStream(); // dont want a new file output, just need the stream
//what i want to do