Only the enclosing class can access a Static Nested interface.
Consider following code in which interface Xyz is enclosed in
class Abc.
public class Abc {
public interface Xyz {
void callback();
}
public static void registerCallback(Xyz xyz) {...}
}
// Client Code
Abc.registerCallback(new Abc.Xyz() {
public void callback() {...}
});
Any code that cannot access Abc can not access interface Xyz also.
So the purpose of declaring an Inner interface is to restrict its
access from outside world