The recommended approach is to use static inner classes, if you must use an inner class at all.
推荐的做法是如果非要使用内部类的话,请使用静态内部类。
Referring to enclosing type parameters inside static methods and static inner classes is prohibited outright by the compiler. So, for instance, the following code is illegal in tiger.
编译器完全禁止在静态方法和静态内部类中引用封闭类型参数。
Why static final variables are accepted in inner classes?
为什么最终的静态变量是接受内心的架势?。
Why static final variables are accepted in inner classes?
为什么最终的静态变量是接受内心的架势?。
应用推荐