今天脑袋短路,对于这个问题纠结了好久.这个问题具体是这样的: public class test { public static void main(String[] args) { test2 t = new test2(); System.out.println("" + t.i); t.meth(); } } public class test2 { public Integer i=5; test2(){ System.out.println("构造函数")…
跟atexit函数相识已久,man手册里对atexit的解释是这么一段: The atexit() function registers the given function to be called at normal process termination, either via exit() or via return from the program’s main(). Functions so registered are called in the reverse order of…