The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
August 2001

Advertisement

Advertisement

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 Screen in Java

Posted by Matt Gerrans on November 03, 2001 at 12:47 PM

Well, in C/C++ it is clrscr() (it is in conio.h), but for the console, Java just has buffered I/O (as far as I know), so do this:


for( int i = 0; i < 25; i++ )
System.out.println();

-mfg

> > Hi, I'm trying to creat a simple program that runs in MS-DOS Prompt, and I've decided not to use the java.awt class (partly because I don't know how). What I was wondering is if there is a way to clear the screen. Any help is greatly appreciated. Thanks in advance.
> > Hiran

> sorry dude I was looking for the same thing when i found this, lol, oh well good luck, to both of us





Replies:
  • Help needed Zonkmaster January 23, 2002 at 8:36 PM (1)
    • Re: Loop Greg February 04, 2002 at 10:27 PM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us