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
Post a Comment