This week is the last week, mainly to learn java ending, and ending learn other jobs, mainly looked unified modeling, learning object graph, case diagram, sequence diagram, communication diagram with and so on;
java interfaces
Interface: an abstract type in java, is a collection of abstract methods. The interface is usually interface to declare. The method of one class to inherit the abstract interface inherited by the process interface. Unless the implementation of the interface is an abstract class, all methods of the class or interface to be defined.
Interface features:
Each interface methods are implicitly designated as public abstract
The interface may contain variables are implicitly designated as public static final
Interface statement:
Viewability interface name [extends other interface name] {
...
};
Implementation of the interface:
Class class name {
Implements Interface Name [other interface name]
...
}
Similar to inheritance and class inheritance interface, support for multiple inheritance.
Marker interface: no interface of any method. The purpose is to establish a common interface or add data types to a class.
Some vector constructor
- vector (): Creates an empty vector
- vector (int nSize): create a vector, the number of elements to nSize
- vector (int nSize, const t & t): create a vector, the number of elements of nSize, and the values are t
- vector (const vector &): Copy constructor
- vector (begin, end): Copy [begin, end) of another section of the array elements in the vector to the