Las interfaces son la herramienta de polimorfismo más poderosa de Java. Una referencia de tipo de interfaz puede contener cualquier objeto que la implemente, y las llamadas a métodos se envían dinámicamente a la implementación real. Esto habilita la Estrategia, el Observador y muchos otros patrones.

Interfaz como tipo polimórfico
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.