As we know, interface is to define some method, but some interface defined as a abstract
interface, but why ?
for example:
public abstract interface Test{
}
what is the advantage for using abstract
to define a interface?
As we know, interface is to define some method, but some interface defined as a abstract
interface, but why ?
for example:
public abstract interface Test{
}
what is the advantage for using abstract
to define a interface?
There is no need to add that abstract
key word. It's redundant there.
Interfaces are implicitly abstract
.
Language Spec JLS# 9.1.1.1 abstract Interfaces
Every interface is implicitly abstract.
This modifier is obsolete and should not be used in new programs.
refer to http://docs.oracle.com/javase/tutorial/java/IandI/createinterface.html for the same.
Also see https://stackoverflow.com/a/18778307/805378 to get the difference between abstract and interface.