public class Threads {
public static void main(String[] args) throws InterruptedException {
Runnable r=new Runnable(){
public void run()
{
try{
Thread.sleep(1000);
}catch(Exception e)
{
System.out.println("interrupted");
}
System.out.println("run");
}
};
Thread t=new Thread(r);
t.start();
System.out.println("started");
t.sleep(2000);
System.out.println("interrupting");
t.interrupt();
System.out.println("deaded");

}
}
这道题的答案是什么?麻烦看一下,谢谢!!!我怎么觉得t.sleep和Thread.sleep(1000)这两句有冲突会抛异常,结果不是,不知道则么回事。