Hi all,
A relatively simple question. Let's say I have a String "Java" and I want to display it one character at a time (J(sleep)a(sleep)v(sleep)a(sleep)), how would I go about doing this in Java?
I should add that I've found a way (listed below) but I'm looking for another way in which I don't have to use {"J","a","v","a"} in an array...
public class test{
public static void main (String args[]){
String java[] = {"J","a","v","a"};
for(int i=0;i<4;i++){
System.out.print(java);
for(int j=0;j<10000000;j++){}
}
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.