Hi all, I'm trying to create an "advancing bar" (don't know how to translate it) for one of my program, and i'd like just to print a character '.' in a line.
The problem is that system.out.flush() doesn't do anything until a new println is called.Why?
boolean[] barra={false,false,false,false,false,false,false,false,false,false,false};
public void barra(int x){
if (!Log){
if ((x!=0)&&(x%10==0)){
if (barra[x/10]==false) {
System.out.print("...running... "+x+"% completed");
System.out.flush(); //doesn't work
}
barra[x/10]=true;
//System.out.flush();
}
}
}
Does someone knows how to solve it?