"\ b" in Java - implemented by Windows

Working with Java in a Windows computer lab.

System.out.print ("Hello!");
System.out.print ("\b");

Print

Hello! []

Where [] is a field to indicate a character, the font does not support or has an invalid ASCII value or something like that.

This is something rather primitive and useful for creating attractive terminal applications, so please help me :)

+3
source share
2 answers

I don’t know about Eclipse’s failures (God knows that I pulled enough hair trying to fix the problems that my colleague gets with Eclipse), but could you handle using the [home] symbol?

System.out.print("Hello!" + (char)13);
System.out.print("      ");
System.out.print("Hello");

kludge \b , , , , !:)

+5

, , Eclipse, , , Windows.

. : backspace\b Eclipses?

+3

Source: https://habr.com/ru/post/1753632/


All Articles