首页 > 题库 > 学历提升 > 自学考试 > 自考本科 > 问答题

阅读程序,请写出该程序的输出结果。
public class Test31 implements Runnable{
public void run(){
try {
System out printn("run()-<1>"):
Thread.sleep(10);
Sytemout.pintn("run()-<2>");
}catch (InterruptedExceptionx) {
Systemoutprintln("run0)-<3>");
return;
}
System.out.printn("run()-<4>");
System.out.println("nun()-<5>");
}
public static void main(String[] args){
Test31 one = new Test31();
Thread other = new Thread();
Thread third = new Thread(one);
other.start); third.start();
try {
System.out.println("run()-<6>");
Thread-sleep(200);
}catch (InteruptedExceptionx) {}
System.out.printn("main0)-<7>");
other.interrupt();]
}
}


参考答案: 查看答案 查看解析 下载APP畅快刷题

相关知识点试题

相关试卷