I'm trying to print on the same line inside a while loop in the eclipse terminal.
I tried the following code:
while (condition)
{
System.out.print("Waiting..\r")
}
And it will just print me lines and lines of "Waiting.." until my condition.
What I want is just "Waiting" printed out on top of the previous print until my condition.
Edit:
Just to be clear, I don't want "Waiting.." printed on many lines but on the same line during my while loop.
So I do NOT want this
Waiting..
Waiting..
Waiting..
Waiting..
[...]
But THIS (No matter how many times it is called inside my while loop)
Waiting..