The autoflushing mechanism of PrintStream and PrintWriter is a bit different. The former automatically calls the flush method when outputting a byte array, calling the println method, outputting a newline character or a byte value of 10 (ie \n), while the latter automatically calls the flush method when the println method is called.