From outside the outer class instance code (including static method code within the outer class), the inner class name must now include the outer class's name:
MyOuter.MyInner
Case #1: Even if the Nested is nested (static inner class), outside the
enclosing class you must refer to it using Outer class name; Nested does not
stand individually.
Case #2 In case of inner class (non nested or non static inner class),
you must have reference to the outer class to create an instance of the
inner class.
Case #3 It is not special, you have created an instance of the outer class
first and in the next line used that reference to create the inner class.
Thus we see that from outside the outer class instance code(including static
method code within the outer class), the inner class name must now include
the outer class's name. K&B
Thanks,