Why would a static nested interface be used in Java?

I have just found a static nested interface in our code-base.

class Foo {
    public static interface Bar {
        /* snip */
    }
    /* snip */
}

I have never seen this before. The original developer is out of reach. Therefore I have to ask SO:

What are the semantics behind a static interface? What would change, if I remove the static? Why would anyone do this?

11 Answers
11

Leave a Comment