Is there a difference in using these two? When would you use one over the other?
PrintWriter out = new PrintWriter(System.out);
The difference is that
System.out is a
PrintStream and the other one is a
PrintStream was meant to write a stream of bytes while
PrintWriter was meant to write a stream of characters. For more information, see PrintStream vs PrintWriter