I would just point out that Ecklel's use of the term "nested class" is a little misleading, because he gives the impression that a nested class is
always static (in constrast to an "inner class").
But according to the JLS, a "
nested class is any class whose declaration occurs within the body of another class or interface." And an "
inner class is a nested class that is not explicitly or implicitly declared static."
In other words, rather than being mutually exclusive (static vs. non-static), inner classes are actually a
subset of nested classes.
Ref:
http://java.sun.com/docs/books/jls/third_edition/html/classes.html http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3