title: System.out not flushing
body: <p>I have a java application that takes input via a Scanner reading System.in, and gives output via System.out. The scanner is always active, it does not terminate without using Ctrl+C via the terminal or ending the process in an IDE.</p>
  
  <p>I'm running into some behavior that leads me to believe System.out is not flushing properly.</p>
  
  <p>In my code there are the lines:</p>
  
  <pre><code>System.out.print(",\\" + '\n');
  System.out.print("     " + someString); 
  </code></pre>
  
  <p>(someString does not contain a newline character)</p>
  
  <p>When I execute this code via the terminal, the whitespace and  someString are not printed to the terminal. However in my IDE's console, it is. (IntelliJ)</p>
  
  <p>If I change the second statement to println instead of print, it works fine, but it does append a new line between one execution of the code and the next, which is not workable here. (Maybe there's something I can do with a carriage return?)</p>
  
  <p>This sounds a lot like the output isn't being flushed, as its only System.out.print that has the trouble. However, adding System.out.flush() after the print statement does not cause it to print.</p>