12/23/2008

Static nested classes

You can deal with static nested classes like other static members.
Sample
public class Test {
    public static void main(String[] args) {
        Outer.Inner inner = new Outer.Inner();
        inner.func();
    }
}
class Outer {
    static class Inner {
        void func(){
            System.out.println("Inner class");
        }
    }
}

Result
Inner class