The recommended approach is to use static inner classes, if you must use an inner class at all.
推荐的做法是如果非要使用内部类的话,请使用静态内部类。
The inner class code calls these static methods whenever it needs to access the mValue field or invoke the doStuff method in the outer class.
内部类会在外部类中任何需要访问mValue字段或调用doStuff方法的地方调用这些静态方法。
The inner class code calls these static methods whenever it needs to access the mValue field or invoke the doStuff method in the outer class.
内部类会在外部类中任何需要访问mValue字段或调用doStuff方法的地方调用这些静态方法。
应用推荐