Interfaces were introduced a few versions ago but now you can extend one or more existing interfaces when you declare an interface. When implementing an interface you’re signing a contract, through which you must implement all methods from all extended interfaces.
Benefits of using Interfaces
Enhanced Readability and Maintenance: They serve as documentation by clearly defining what each component does, making it easier for other developers to understand and work with the system.
Enforced Consistency: When multiple objects implement the same interface, they all adhere to the same method signatures and structure. This uniformity across implementations makes it easier to maintain code and ensures consistency.
Documentation:
Source code here:
https://github.com/SilviuVirlan/ExtendInterfacesSample
About all this and much more in my latest YouTube video:


