What I mean is:
interface B {...}
interface A extends B {...} // allowed
interface A implements B {...} // not allowed
I googled it and I found this:
implementsdenotes defining an implementation for the methods of an interface. However interfaces have no implementation so that’s not possible.
However, interface is an 100% abstract class, and an abstract class can implement interfaces (100% abstract class) without implement its methods. What is the problem when it is defining as “interface” ?
In details,
interface A {
void methodA();
}
abstract class B implements A {} // we may not implement methodA() but allowed
class C extends B {
void methodA(){}
}
interface B implements A {} // not allowed.
//however, interface B = %100 abstract class B
implementsmeans implementation, wheninterfaceis meant to declare just to provideinterfacenot for implementation.A 100%
abstract classis functionally equivalent to aninterfacebut it can also have implementation if you wish (in this case it won’t remain 100%abstract), so from the JVM’s perspective they are different things.Also the member variable in a 100% abstract class can have any access qualifier, where in an interface they are implicitly
public static final.