1

So if I have a basic terminal app in Java with three printed lines like,

Progress: 30%
Total items = 3
Name next item here -> :

How would you edit the 1st or 2nd line? I tried using \r but that seems to only work on the current line. Is there a special function or escape character that would work?

Tyler Moen
  • 81
  • 5

1 Answers1

0

I'm pretty sure \r only works with one line.

You could always clear the whole console (Java: Clear the console)

Ayush Garg
  • 2,234
  • 2
  • 12
  • 28
  • The "cls" command above does not work for me on Windows, but the `clearScreen()` solution further down that same SO post does clear console. – DuncG Nov 23 '20 at 12:04