The package is a set of classes and interfaces. It is a method for managing large namespaces. Interface When multiple classes operate very similar, the Abstract member function is useful, but uses abstract member functions, you must create a new class, which is sometimes troublesome. The interface provides a place for this member function set. (Ie a class of common behavior and attributes of a class). The interface provides a method of encapsulating a function protocol without having to force users to inherit. The advantage is that an interface can be implemented any more class, each class can share the program interface without having to care about how other classes are implemented. The interface is a method of achieving method separation. The interface makes you only care about the behavior you want. And don't have to care about the details. Access to classes with the same behavior and attributes do not have to be inherited. Interface declaration and definition public / static / final interface nameOfinterface [extends interface) {Property ..... behavior .....} Declare interface method, you can only use public, Abstract modifiers, and defaults to public. Declaration Domain: [public / static / final] type field_name = ..; the domain in the interface must be or default as public, static, final. Explicitly for reading. The interface domain can only initialize once, no matter how many object instances implement the interface. The reference to the interface is prefixed with the name of the interface when multiple interfaces, such as Interface1.field1. The mark interface interface is not necessarily a declaration of methods and domains, without any methods and declarations of the domain called tag interface. Extended interface, sub-interface will inherit all domains and method interfaces of their parent interfaces cannot be extended, and when a class implements an interface, the class should implement all methods of the interface, otherwise it is to be declared as an abstract class.