Review of Interfaces and AICs
Review 3 Types of Interfaces in Java
Review 3 Types of Interfaces in Java
Marker Interfaces (zero abstract methods)
Regular Interfaces
SAM Interface now called Functional Interface
Also note that starting in Java version 8, non-abstract methods called default methods can now also be defined in an interface in java.
Example of Marker Interface: Serializable
Example of Marker Interface: Serializable
Example of a Regular Interface
Example of a Regular Interface
Interface Bicycle {
void go();
void shift(int gear);
int stop();
}
Example of Functional Interface: Comparator
Example of Functional Interface: Comparator
Review of Annonymous Inner Class
Review of Annonymous Inner Class