What's the advantage of making an inner class as static with Java?

后端 未结 6 1289
梦毁少年i
梦毁少年i 2020-12-13 18:21

I have an inner class in my Java class.

\"enter

When I run find bugs, it recom

6条回答
  •  孤城傲影
    2020-12-13 19:07

    A Non-static inner class has an implicit reference to outer class. If you make the class as static, you could save some memory and code.

提交回复
热议问题