...

/

Interface Inheritance

Interface Inheritance

Get familiar with the concepts of interfaces in general and the interface inheritance in detail.

Interfaces

The interface keyword is for defining interfaces in class hierarchies. interface is very similar to class with the following restrictions:

  • The member functions that it declares (but not implements) are abstract even without the abstract keyword.

  • The member functions that it implements must be static or final. (static and final member functions are explained later in this chapter.)

  • Its member variables must be static.

  • Interfaces can inherit only interfaces.

Despite these restrictions, there is no limit on the number of interfaces ...