I know it is language-specific, but is it possible in OO-languages that interfa开发者_运维知识库ces implement other interfaces?
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;
interface can extend but not implement another interface, since there is no implementation in the interface.
Yes, though the term used is "extend" rather than "implement."
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
精彩评论