<p>I have just found a static nested interface in our code-base.</p>

<pre><code>class Foo {
    public static interface Bar {
        /* snip */
    }
    /* snip */
}
</code></pre>

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

<p>What are the semantics behind a static interface? What would change, if I remove the <code>static</code>? Why would anyone do this?</p>

An inner interface has to be static in order to be accessed. The interface isn't associated with instances of the class, but with the class itself, so it would be accessed with
```
Foo.Bar
```
, like so:
```
```
public class Baz implements Foo.Bar {
   ...
}
```
```
In most ways, this isn't different from a static inner class.