public class AADemo_7 {
static {
AADemo_5.class.getClass();
}
public static void main(String[] args) {
}
}
代码中AADemo_5.class.getClass();这样写有什么用呢?
我是在Spring源码中看到的:
static {
// Eagerly load the ContextClosedEvent class to avoid weird classloader issues
// on application shutdown in WebLogic 8.1. (Reported by Dustin Woods.)
ContextClosedEvent.class.getName();
}
请问这是什么意思啊?