while(i++ < something){
Thread.sleep(100);
//do something now
}
and i think this should work but wats happening is that rather having this 1 sec delay everytime the loop runs .. wat it does is that it stops for 1 sec and then print out the whole loop
can someone help me with this
keep in mind that there are 2 sort of output stream: buffered and unbuffered. On most systems, System.err is the unbuffered output (thus you can rely on the fact that the system will display what you give it as fast as it can), while System.out is buffered (if the system feels so, it can defer the display of your strings until it decides it has enough bytes to output so that it 'worth' the effort).