What is System. out. Flush() ; | Sololearn: Learn to code for FREE!


What is System. out. Flush() ;

3/13/2018 10:08:01 PM

mateo quiceno toro

2 Answers

New Answer


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.


1-https://stackoverflow.com/questions/7166328/when-why-to-call-system-out-flush-in-java 2-https://stackoverflow.com/questions/19183955/why-we-use-system-out-flush/19184077