Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Don't lose your output!
Suppose we have written an application or applet that displays output using the System.out or System.err output streams.
When running this application or applet the output will be displayed in the started DOS box.
But what if the output contains many lines, or is displayed too fast, so we can't read what is displayed in the DOS box?
Two different solutions can be used to solve this problem:
// Wait for user to press Enter key // try { Sytem.in.read(); } catch(IOException ioex) { // do nothing, shouldn't happen }When our program reaches this statement, program execution will stop, and will only continue after the user presses Enter.