Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Erasing the console!!

 
Sidd Kulk
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know that using System.out.println(); we can output our values to console. Is there any way we can erase values from console?? Say, I output a string through SOP, and after that I wish to erase it from console. Is it possible??

Thanks
Sid
[ April 27, 2007: Message edited by: Sidd Cool ]
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is not possibilities to doing this...
 
Srikanth Ramu
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to redirect all the System.out.println() to any file then you can use System.setOut(PrintStream out);

This way you can avoid printing in the console and refer the file the prints
 
Joe Ess
Bartender
Pie
Posts: 9257
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use ASCII control characters, like 0x0d (carrage return) or 0x08 (backspace) to control the cursor on a single line. If your console recognizes ANSI escape sequences, they allow greater flexability (Windows requires some configuration to get these to work).
If you want a fully-featured GUI, use AWT or Swing.
By the way, Sidd, we have a naming policy here at the Ranch. In short, your name must be a first and last name, separated by a space and not obviously fake. You can change your name here. Thanks for your prompt attention.
[ April 27, 2007: Message edited by: Joe Ess ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic