class InnerClass
is implicitly(converted to by the compiler as per JLS, Section 9.5)
A member type declaration in an interface is implicitly static and public. It is permitted to redundantly specify either or both of these modifiers.
static class InnerClass
because it is in an interface.
You will get the error when changing interface to class, because non-static Inner Classes are not allowed, and it's not implicitly converted to static in the case of a class.
To answer your final question directly,
yes, StaticNestedClass
and InnerClass
are just the same