Why does System.out.print cause autoflush?
问题 System.out is a PrintStream object. I read the documentation on PrintStream. What I don't get is why System.out.print causes the buffer to be flushed? Shouldn't that happen only for println? 回答1: Shouldn't that happen only for println? The Javadoc doesn't say when it won't be flushed. And it says it will be flushed on a println() or a newline . 回答2: At the risk of repeating the facts that have already been noted, let me try to interpret the doc a little differently... It seems that it's only