This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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??
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 ]