First of all to be picky, according to the JLS there is no such thing as a static inner class, that critter is called a Nested Top Level class.
From the JLS 8.1.2
An inner class is a nested class that is not explicitly or implicitly declared static
Nested Top Level classes can access all of the static members of the outer class even if they are private.
class Test
{
static private int i = 56;
static class InnerTest{
{
System.out.println(i);
}
}
public static void main(String args[]){
Test.InnerTest a = new Test.InnerTest();
} }
prints 56
[This message has been edited by Cindy Glass (edited March 30, 2001).]