⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e050. determining when the application is about to exit.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
When an application is terminated normally, the application first starts any registered shutdown threads, waits for them to complete and then finally exits. Normal termination can be caused by a call to System.exit(), the completion of the last non-daemon thread, or the interruption of the application (control-C) by the user. Abnormal termination (which does not cause the shutdown threads to be started) is caused some major fault in the Java virtual machine or native library. 
    // Register a shutdown thread
    Runtime.getRuntime().addShutdownHook(new Thread() {
        // This method is called during shutdown
        public void run() {
            // Do shutdown work ...
        }
    });

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -