I think I am overlooking a very basic concept here... Why can't we have an Interface that implements an Interface? Or is it that Interfaces should always be top level, there cannot be an Interface somewhere in between a hierarchy tree?
interface extends another interface but not implements it, because interface will not contain the implementation (you cannot provide implementation in the interface). So you can just extend it but not implement it.
Implements denotes defining an implementation for the methods of an interface. However interfaces have no implementation so that's not possible. An interface can however extend another interface, which means it can add more methods and inherit its type.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Joined: Sep 05, 2007
Garret and Deepa, Thank you!! That answers my question.
When you implement an Interface to a class you must re-declare all the class and fill them up. Which is not possible in Interface as Interfaces are abstract. So You can't implement an interface to another interface but you can happily extend.