Una clase anónima es una clase que se declara y se crea una instancia en una sola expresión. No tiene nombre y se utiliza para implementaciones únicas de una interfaz o extensión de una clase. Antes de lambdas (Java 8), las clases anónimas eran la forma estándar de transmitir comportamiento.
Sintaxis de clase anónima
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.