Is there any difference in these statements
System.out.println(error);
AND
PrintStream ps = new PrintStream((OutputStream)System.out); ps.println(error);
System.out is already a PrintStream,
System.out
PrintStream
PrintStream ps = new PrintStream((OutputStream)(System.out));
would only wrap it once more which seems pointless.
2.1m questions
2.1m answers
60 comments
57.0k users