• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

System.flush() ?

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The text is unclear what this method does, but said that sometimes what you should see on the screen is not there, and using this method can help with that. I shrugged it off, but earlier, one of my message boxes came up blank. I closed it, and the program continued as if nothing had happened, so I'm guessing I could have used System.flush() somehwere? How do I know when and where to use it?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's System.out.flush(). Basically, you need to use it if you call System.out.print() (not println()) and want the output to appear on the screen right away, as opposed to later after the next println() call. It won't affect GUI message boxes at all -- it's only related to console output.
reply
    Bookmark Topic Watch Topic
  • New Topic