Why an interface can not implement another interface?

Viewed 112716

What I mean is:

interface B {...}

interface A extends B {...} // allowed  

interface A implements B {...} // not allowed

I googled it and I found this:

implements denotes 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
7 Answers

Interface is like an abstraction that is not providing any functionality. Hence It does not 'implement' but extend the other abstractions or interfaces.

Related