+ 2

What is System. out. Flush() ;

13th Mar 2018, 10:08 PM
mateo quiceno toro
mateo quiceno toro - avatar
2 Antworten
+ 7
Depending on what is written and where it is written, data can be stored in a buffer to be outputted once the buffer is full improving program performance. Flush is used to tell the i/o system you don't care about performance you want to be sure the data is guaranteed to be written now. This is important for some shared files used between processes or in the case your program might crash.
13th Mar 2018, 10:59 PM
John Wells
John Wells - avatar