Interface Nuances

Recall in Java we cannot have multiple inheritance. In other words, a class (regular or abstract) cannot be a direct child of more than one (regular or abstract) class.

On the other hand, a class may implement more than one interface.

public class SomeClass implements InterfaceA, InterfaceB {

}

As shown in the example above, the syntax involves a comma-separated list of interfaces that the respective class implements. This is the closest thing Java has to Multiple Inheritance.

A class can extend another (regular or abstract) class and implement one or more interface:

public class SomeClass extends OtherClass implements InterfaceA, InterfaceB {

}

When a class implements an interface, it must implement all its methods unless it is an abstract class in which case it can defer the implementation of those methods to its subclasses.

An interface itself can be a subtype of another interface in which case it is said that it extends the other interface:

public interface SomeInterface extends OtherInterface {

}