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*

4
  • 49
    Great story, thanks. It has one mistake though. You can access the fields of an outer class from an instance inner class by Rhino.this.variableName . Commented Jul 30, 2009 at 7:44
  • 1
    You start the comment with there are two categories and then in the middle of the comment you write there are four kinds ..., it confused me to be honest. A category is not the same as "kind"? Commented Aug 16, 2021 at 22:08
  • @NoobCoder It's two top level categories: static nested class and non-static nested class (also called inner class). This distinction specifies if they have access to and are tied to a specific instance of the outer class or not. The four specific types listed fall into the two categories: a static class is a static nested class; and an inner class, a local inner class, and an anonymous inner class are all non-static nested classes, also called inner classes. Commented Aug 23, 2024 at 0:16
  • Essentially: the new operator is defined as global operator for non-nested classes as well as local operator for realtively nested classes. Commented Aug 29, 2024 at 11:01