title: What exactly is the use of flush for a printwriter object?
body: <p>I'm looking for a theoretical analysis. I mean, how does the buffer system works and what advantage does using flush provide? Kindly illustrate with an example, if possible.</p>