Java does not allow a class to extend multiple classes, but it can implement multiple interfaces. Interfaces themselves can also extend multiple other interfaces. This provides a safe way to compose behaviours.
Реализация нескольких интерфейсов
Java does not allow a class to extend multiple classes, but it can implement multiple interfaces. Interfaces themselves can also extend multiple other interfaces. This provides a safe way to compose behaviours.