public static void main(String[] args) {
        System.out.println("1111111111");
        try {
            Thread.sleep(5000);
        } catch (Exception e) {
            // TODO: handle exception
        }
        Runtime.getRuntime().addShutdownHook(new Thread(){
            @Override
            public void run() {
                Thread.currentThread().setName("main");
                System.out.println("0000000000000000");

            }
        });
        
        System.out.println("2222222222");
    }

 

相关文章:

  • 2021-06-20
  • 2021-10-07
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-01-13
  • 2021-05-14
  • 2021-12-27
猜你喜欢
  • 2021-08-20
  • 2021-07-25
  • 2021-06-26
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案