Ref. page 642
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
(emphasis mine)
However, this doesn't seem to be accurate. For instance, this code compiles and runs (under a 1.4 compiler, albeit, as I don't have access to a 1.5 one currently):
class MyOuter {
class MyInner {
private int x = 5;
int getX() { return x; }
}
public static void main(String [] args) {
MyOuter out = new MyOuter();
MyInner m = out.new MyInner(); // not MyOuter.MyInner
System.out.println(m.getX());
}
}