62,614
社区成员
发帖
与我相关
我的任务
分享
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();
}
}