> For the complete documentation index, see [llms.txt](https://gyansetu-java.gitbook.io/core-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gyansetu-java.gitbook.io/core-java/interfaces/extending-interfaces.md).

# Extending Interfaces

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LUnXcDjznzk01lR1AQm%2F-LUncCfCYs7B_Tr46iVv%2Fimage.png?alt=media\&token=97a17b12-4da1-43dd-a6fd-d64fb3a33065)

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LUnXcDjznzk01lR1AQm%2F-LUncMKLAAUYczNwTfJ_%2Fimage.png?alt=media\&token=e91aa6ab-a031-4778-84df-fd1c05f829f3)

By extending interfaces, you can combine methods of multiple interfaces. In the previous example, the interface FamilyPGHouse combines the methods of the interfaces ChildFriendly, PayingGuestHouse, and GuestHouse. When a class implements an interface, it should implement all the methods defined in the interface and its base interfaces, unless it’s declared as abstract. If, for example, a class implements the interface PayingGuestHouse, that class must implement method paidBreakfast() defined in the interface PayingGuestHouse, and method welcome() defined in the interface GuestHouse.

![](https://3494582050-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSemf7mp1liQa7nfIAC%2F-LUnXcDjznzk01lR1AQm%2F-LUncXbBhzwRx_Hz6wZu%2Fimage.png?alt=media\&token=472f3e11-66fe-45ff-8884-5adff528388e)
