When/why to call System.out.flush() in Java
System.out is based around a PrintStream which by default flushes whenever a newline is written. From the javadoc: autoFlush – A boolean; if true, the output buffer will be flushed whenever a byte array is written, one of the println methods is invoked, or a newline character or byte (‘\n’) is written So the println … Read more