String word = "生而为人,我很抱歉";
char[] ch = word.toCharArray();
for(char c : ch){
System.out.print(c);
try{
Thread.sleep(1000);
}catch (InterruptedException e){
e.printStackTrace();
}
}
Thread.sleep方法的使用,使得字符产生停顿
最新推荐文章于 2022-09-13 15:18:58 发布