Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 23
    "There is no semantic difference between a static nested class and every other class." Except the nested class can see the parent's private fields/methods and the parent class can see the nested's private fields/methods. Commented Jun 22, 2010 at 14:56
  • Wouldn't the non-static inner class potentially cause massive memory leaks? As in, every time you create a listener, you create a leak? Commented Dec 15, 2014 at 8:24
  • 3
    @G_V there's definitely potential for memory leaks because an instance of the inner class keeps a reference to the outer class. Whether this is an actual problem depends on where and how references to instances of the outer and the inner classes are held. Commented Dec 17, 2014 at 9:09