IO output PrintStream and PrintWriter

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.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324574956&siteId=291194637