is it possible to override the last System.out.println output, so i can for example visualize changes in a array or create a progessbar?
For example if i have this class:
class Main{
public static void main(String[] args){
for(int i = 0; i < 10; i++){
for(int j = 0; j < i; j++){
System.out.print("#");
}
System.out.println("");
}
}
}
What do i have to do to create this simple progressbar which is shown in a single line and not in 10 seperate lines?
This works on my particular console (Windows) but it’s not terribly portable…
There’s also the
Consoleclass, but that doesn’t actually buy you very much as far as I can see…