The interface is the key to implementing component-induced, and the key to insertless components is that there is a public interface, and each component is implemented. What is an interface? The interface in Java is a series of declarations. It is a collection of method features. One interface only has the realization of the characteristics of the method, so these methods can be implemented in different places, and these implementations can have different Behavior (function). The two meanings of the interface: a Java interface, the structure in the Java language, there is a specific syntax and structure; two, the characteristic set of the method of a class is a logically abstraction. The former is called "Java Interface", the latter is called "interface". In the Java language specification, one method is characterized by only the names, parameters of the method, and the type of parameters, and the return type, parameter name, and exceptions thrown. When the overload of the Java compiler check method, it is determined whether two methods are overloaded methods based on these conditions. However, when the Java compiler checks the replacement, the return type of two methods (sub-hypening and subtypes) will be further checked, and whether the exception thrown is the same. Interface inheritance and implementation of the rules of the inheritance, only one direct parent class, but multiple interfaces can be implemented. The Java interface itself does not have any implementation, because the Java interface does not involve the appearance, and only describes the public behavior, so the Java interface is more abstracting than the Java abstraction class. The Java interface can only be abstract and disclosed. The Java interface does not have a constructor, and the Java interface can have public, static and final properties. The interface is separated by the implementation of the features and methods of the method. This segmentation is reflected in the interface often represents a role, which is packaged with the role-related operations and attributes, and the class that implements this interface is an actor who plays this role. One role is played by different actors, while different actors do not require other common situations in addition to playing a common role. Why use an interface? Two similar functions in two classes, calling their dynamic decisions, then they provide an abstract parent class, the subclass, the method defined by the parent class, respectively. The appearance of the problem: Java is a single inherited language. Under normal circumstances, which specific class may already have a super class, solve it to add the parent class to its parent class, or parental class to the parent class Only the top of moving to the class level structure. In this way, the insertable design of a specific class has become a modification of all classes in the entire level structure. The interface is an insertable guarantee. Any interface can be implemented in any of a level structure, which affects all subclasses of such classes, but does not affect any superclasses of such classes. This type will have to implement the method specified in this interface, and its subclasses can automatically inherit these methods from this class, of course, can choose to replace all of these methods, or some of them, this time these subclasses have Insertability (and can be loaded with this interface, all of which implement all of his subclasses). What we care is not the specific class, but whether this category implements the interface we need. The interface provides the interposability of the association and method call, the larger the size of the software system, the longer the life cycle, the interface makes the software system flexibility and scalability, and insertability. Types Use the Java interface to couple the software unit with internal and external. Using the Java interface is not a specific class for variables, the method of returning type declaration, the type of parameter, and the conversion of the data type.