What are the uses of inner classes in Java? Are nested classes and inner classes the same? [duplicate]
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Java inner class and static nested class What are the uses of inner classes in Java? Are nested classes and inner classes the same? 回答1: No, they're not the same: an inner class is non- static . JLS 8.1.3 Inner Classes and Enclosing Instances An inner class is a nested class that is not explicitly or implicitly declared static. Consult also the following diagram from Joe Darcy: Joseph D. Darcy's Oracle Weblog -