Roberto Perillo wrote:I myself avoid inner classes and static stuff as much as possible.
Actually, I find static nested classes (I don't like the term 'inner') very useful, because it defines exactly what I want: a class that only has meaning within the context of another class, and which should probably be qualified with it when used from outside (eg, AbstractMap.SimpleEntry).
Isn't it funny how there's always time and money enough to do it WRONG?
I agree, static nested classes can be great, especially when they're completely for the convenience of their enclosing class (like a tuple, or some other aggregation of data). In this case, you don't have to give them any methods, you can just use them as records and access their private fields directly.