日期:2014-05-20 浏览次数:20796 次
public class SomeThread implements Runnable
{
public void run()
{
System.out.println("sleep...至 not runnable状态");
try
{
Thread.sleep(9999);
}
catch (InterruptedException e)
{
System.out.println("I'm interrupted...");
}
}
public static void main(String[] args)
{
Thread thread = new Thread(new SomeThread());
thread.start();
thread.interrupt();
}
}