how to print String one after another in java -


i want know want print string 1 after in particular time interval.

everything fine.

i want know when second string print override first 1 , third override second , on..

how can this?

this code :

public class stringtest {    public static void main(string args[]) {      string arr[] = { "mahtab", "hussain", "yasir", "azmi", "saif" };      int l = arr.length;      (int = 0; < arr.length; i++) {       system.out.print(arr[i]);       try {         thread.sleep(5 * 1000);       } catch (interruptedexception e) {         e.printstacktrace();       }     }   } } 

you can carriage return \r.

system.out.print(arr[i]+"\r") 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -