title: Java - How to use PrintStream/OutputStream to print to the Command Line
body: <p>I know we can use PrintStream to print lines to a given file: </p>
  
  <pre><code>    PrintStream output;
      output = new PrintStream("./temp.txt");
      output .println("some output text"); 
  </code></pre>
  
  <p>However, can we use PrintStream to print lines to the <strong>command line</strong>?</p>
  
  <p>I've looked through the Java docs and it seems PrintStream constructor can take a file path or an OutputStream (is there a OutputStream subclass that would print to command line?)</p>