Quantcast
Viewing latest article 14
Browse Latest Browse All 15

Answer by Jon Skeet for Static nested class in Java, why?

To my mind, the question ought to be the other way round whenever you see an inner class - does it really need to be an inner class, with the extra complexity and the implicit (rather than explicit and clearer, IMO) reference to an instance of the containing class?

Mind you, I'm biased as a C# fan - C# doesn't have the equivalent of inner classes, although it does have nested types. I can't say I've missed inner classes yet :)


Viewing latest article 14
Browse Latest Browse All 15

Trending Articles