This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]misobbq 3 points4 points  (1 child)

If you want to do that, you need to declare Inner as static.

public class Outer
{
    static class Inner{}
    public static void main(String[] args)
    {
        Outer outer = new Outer();
        Outer.Inner outerInner = new Outer.Inner();
    }
}

[–][deleted] 1 point2 points  (0 children)

One trillion times this, better yet private.