This question is mainly addressed to Jane Griscti but anyone who has any idea about the answer is free (and encouraged) to give it
In the tutorial "SCJP2 Study Notes", in section "Overloading, Overriding, Runtime Types and Object Orientation - Static Nested Classes" it is stated, I quote:
- they are not associated with an instance of their outer class ie you can create an Inner class object from within the Outer class using new Inner(); you do not need to create an Outer class object first as is required with non-static inner classes
- you cannot create instances of a static inner class
So to summarize, the first statement says that we may create an Inner class object and the second statement says that we cannot create instances of static inner classes. It is worth noting that both statements concern static inner classes, a.k.a. top-level nested classes.
Anyone any insight ?
Thank you very much
Val