填空题
以下程序使字符串“文字的特殊输出效果演示”中的所有文字每隔300毫秒显示一个。
public class Class3101
{
public static void main(String[]args)
{
String s="文字的特殊输出效果演示";
for(int i=0; i<s. length(); i++)
{
System. out. print(s. substring(i,i+1));
try{______;}
catch(______){}
}
}
}
【参考答案】
Thread.sleep(300)
InterruptedException e