Is it possible in Java to show the results of a for loop in only one Output?
<p>I have a little code that displays a countdown in the console.</p>

<pre><code>for(int i = this.roundTimerMinute; i &gt; -1; i--)
    {
        for(int j = this.roundTimerSeconds; j &gt; 0; j--)
        {

            if( j &lt; 10)
            {
                System.out.println(i + ":0" + j);
            }
            else if(!(i == 0 &amp;&amp; j == 60) &amp;&amp; (j &lt; 56 &amp;&amp; i == 1))
            {
                System.out.println(i + ":" + j);
            }
            else if(i == 0 &amp;&amp; j != 60)
            {
                System.out.println(i + ":" + j);
            }

            if(i == 0 &amp;&amp; j == 60)
            {
                System.out.println("1:00");
            }

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {}
        }
    }
</code></pre>

<p>Currently the output is something like:</p>

<pre><code>1:55
1:54
1:53 
.
.
.
</code></pre>

<p>Is is possible to display the whole countdown in only one line. Not consecutively but the new println() overdisplays the old one like this:</p>

<pre><code>1:55 (this display is overridden 1 seconds later by 1:54 and so on)
</code></pre>

<p>I would appreciate any help.
Thanks </p>

<p>MageD</p>

<p>Edit: So it works with the /r command but only in the CMD of Windows itself. Maybe its a bug or so, but it answers my question. Thank you :)</p>