Possible Duplicate:
Write to same location in a console window with java
I was wondering if theres a way, in java, to replace a line of output you outputted to the terminal, such that you could do like a progress bar/counter type thing.
I’d like to do something akin to printing out “Records inserted 1/1000” and then “Records inserted 2/1000” over the top, replacing it so that only the most recent one shows.
Print the \r character, which places the cursor at the beginning of the line. And then write the new line.