methods (procedures) as arguments. Therefore, in order to pass a method as a parameter to a target method, current practice is to define and pass a reference to an interface as a means of supplying the signature and address of the parameter method to the target method rather than defining multiple variants of the target method to accommodate each possible calling class. Subinterfaces Interfaces can extend several other interfaces, using the same formula as described below. For example, public interface VenomousPredator extends Predator, Venomous { // Interface body } is legal and defines a subinterface. It allows multiple inheritance, unlike classes. Predator and Venomous may possibly define or inherit methods with the same signature, say kill(Prey p). When a class implements VenomousPredator it will implement both methods simultaneously. Examples Some common Java interfaces are: has the method , which is used to describe two objects as equal, or to indicate one is greater than the other. Generics allow implementing classes to specify which class instances can be compared to them. is a marker interface with no methods or fields - it has an empty body. It is used to indicate that a class can be serialized. Its Javadoc describes how it should function, although nothing is programmatically enforced See also Mixin Trait (computer programming) References External links What Is an Interface? Java (programming language) Interfaces Articles with example Java code