2

I know it is language-specific, but is it possible in OO-languages that interfaces implement other interfaces?

4 Answers4

5

in C# you can do:

interface YourInterface: IDisposable {
   /// your methods
}

and a class wich implements YourInterface shall also implement IDisposable's method.

Of course, then this is valid:

YourInterface implementation = new Implementation();
IDiposable disposable = implementation;
Simone
  • 11,655
  • 1
  • 30
  • 43
  • @Rofl: I've only ever seen the term "super interface" applied to Java, and I'm not a Java developer. What exactly does it mean, and if you're more comfortable with that language, why not ask the question specifically about Java? – Cody Gray - on strike Feb 09 '11 at 10:06
  • @Roflcoptr you name it. The point is that an object which implements YourInterface *is a" IDisposable too. – Simone Feb 09 '11 at 10:16
5

interface can extend but not implement another interface, since there is no implementation in the interface.

CloudyMarble
  • 36,908
  • 70
  • 97
  • 130
4

Yes, though the term used is "extend" rather than "implement."

Joshua Fox
  • 18,704
  • 23
  • 87
  • 147
0

In simple words Implementation means applying set of predefined rules.interface is same like this.so an interface can not implement other interface.thats why we extend one interface with other