Roedy Green said:
I think they are just synonyms. Wait for the language lawyer
responses.
the big difference in between named and anonymous inner classes.
The other big difference is between static and instance inner classes.
statics don't need a mother object.
See
http://mindprod.com/jgloss/innerclasses.html
They aren't synonyms, its just that the definitions have changed over time.
Unfortunately Sun has had to evolve its own confusing and contradictory use
of the terms. They used to talk about oxymorons like nested top-level
classes and static inner classes. See this bit I wrote a while back about
the change in terminology:
--------------------------------------
There has been a rethinking in the terminology used for nested classes. The
old terminology used in the ammendments and clarifications to the original
JLS is confusing and contradictory. They have cleaned up the terminology in
the new version of the JLS (which is now released). Here is the new
terminology, which should be used. Consider the old, confusing terminology
of nested top-level classes and static inner classes as deprecated.
- There are top-level classes and nested classes. There is no such thing as
a nested top-level class. A nested class is simply any class defined within
another class.
- Nested classes come in two flavors, static nested classes and inner
classes. Inner classes have an implicit link to an instance of the class
they are declared within. They cannot be instantiated apart from an instance
of their outer class. Static nested classes have no implicit link to an
instance of the outer class. The term static inner class is now a
contradiction in terms.
- Inner classes come in two varieties: named and anonymous.