This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
Clearing the Scrren
Posted by Matt Gerrans on December 11, 2001 at 6:07 PM
> Try to make this instead of executing any commands... > for (int i=0; i<25; i++) System.out.println();
And what if your screen has more than 25 lines? Additionally, the normal behavior of a cleared screen is to have the cursor at the top, not the bottom.
> It is better for memory performance and will clear your screen
"Better for memory performance?" Are you joking about this part? As for performance, doing 25 (or more) println() s is slower than a single clrscr(). - mfg
Replies:
|