I've recently realised that an interface can be declared like this in Java.
public abstract interface Foo
{
// ... body
}
Why is this a valid syntax? Semantically, it doesn't make any sense to me (ie., an interface is already abstract, isn't it? ).
Is there any difference between an interface declared with abstract and the one without?
abstractis an obsolete modifier. It is still in use to declare abstract classes which are clearly different from interfaces