public class Enclosing {
private static int x = 1;
public static class StaticNested {
private void run() { ...}
}
public void test() {
// StaticNested is of course visibile here -
// even if it were private
StaticNested nested = new StaticNested();
nested.run();
}
}
class Another {
public void test() {
// works since both Enclosing & StaticNested are visible here
Enclosing.StaticNested nested = new Enclosing.StaticNested();
nested.run();
}
}