If we add static on Inner class, it won't compile. Because static member class doesn't know about Outer class's instance.
public class Outer {
public void doit(){
Inner inner = new Inner();
inner.doit();
}
private void doitAgain(){
System.out.println("do it again");
}
private class Inner {
public void doit() {
Outer.this.doitAgain();
}
}
public static void main(String[] args){
new Outer().doit();
}
}