-3

As we have Object class as super class of all the classes. So do we also have super Interface of all the interfaces?

Asif
  • 23
  • 1
  • 6
  • 3
    What would be the purpose of such an interface? You can already use `Object` to accept an object of any type. It might be best that you expand the question with your use case. – E_net4 Aug 17 '18 at 13:07
  • 2
    Any instance of any interface must be an instance of `Object`. So essentially it's still `Object`. – khelwood Aug 17 '18 at 13:08
  • 4
    Possible duplicate of [What is the super class for all the interfaces in java](https://stackoverflow.com/questions/22451297/what-is-the-super-class-for-all-the-interfaces-in-java). Also [implicit super-interface in Java?](https://stackoverflow.com/questions/803466/implicit-super-interface-in-java) – Malte Hartwig Aug 17 '18 at 13:08
  • 1
    We have ```Object``` class as super class of all the classes, interfaces and enums. – zhh Aug 17 '18 at 13:08

1 Answers1

0

No, there's not an ultimate super Interface that all Java interfaces inherit from. If you follow the links in the javadoc under All Superinterfaces for some common interfaces, you'll see that they don't all end up in the same place. For example, Iterable and Serializable have no superinterface at all, so there isn't one that all interfaces have in common.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880