Examples of inner, nested, local and anonymous classes from JDK, JRE

104 Views Asked by At

I find a very useful to read this question: Java inner class and static nested class, but can't find there any example from Java. Could you provide me with real examples of using those classes from JDK, JRE?

1

There are 1 best solutions below

1
Alex Evseenko On BEST ANSWER

Nested classes (static inner) do not have a reference to outer context. Map#Entry is an example of such nested class -- it contains only key, value pair properties and by definition has no access to outer Map implementation.