Working on Java in a Windows-run computer lab.
System.out.print ("Hello!");
System.out.print ("\b");
Prints
Hello![]
Where [] is a box, so as to signify a character the font doesn't support, or has an invalid ASCII value or something.
This is something pretty primitive, and comes in handy to make fancy looking terminal applications, so please help me out :)
I don't know about Eclipse's failures (god knows I've pulled enough hair out trying to fix issues my coworker gets using Eclipse), but could you manage with using the [home] character?
System.out.print("Hello!" + (char)13);
System.out.print(" ");
System.out.print("Hello");
It's a kludge compared to \b
for your purpose, but if the output you're using doesn't work with one control character, try another! :)
This problem indeed occurs in at least Eclipse's console, but certainly not in Windows command console.
Also see this related topic: How to get backspace \b to work in Eclipse’s console?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With