日期:2014-05-20 浏览次数:20863 次
public class T implements Runnable {
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.println("exception");
} finally {
System.out.println("finally");
}
}
public static void main(String[] args) throws Exception {
Thread t = new Thread(new T());
t.setDaemon(true);
t.start();
}
}