AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
### 以下两种情况不会运行 #### 中止jvm ``` public class FinallTest { public static void main(String[] args) { try { System.out.println("one"); System.exit(0); } catch (Exception e) { System.out.println("second"); System.exit(0); } finally { System.out.println("third"); } } } ``` #### 守护线程中的finally ``` public class FinallTest { public static void main(String[] args) { Thread thread = new Thread(new DeamanRunner()); thread.setDaemon(true); thread.start(); } static class DeamanRunner implements Runnable { @Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); }finally { System.out.println("hahhhhh"); } } } } ```