Static: static usage: it is a modifier used to modify members (member variables, member functions ). when a member is modified statically, an additional call method is provided. In addition to being called by an object, the member can also be called directly by the class name. Format: Class Name. static member. Static features: 1. Loading with classes. That is to say: static will disappear with the disappearance of the class. It indicates that the lifecycle is the longest. 2. objects with a higher priority have a clear point: static objects exist first. Objects exist. 3, shared by all objects 4, can be called directly by class name. Differences between instance variables and class variables: 1. storage location class variables exist in the method area as the class is loaded. Instance variables exist in heap memory as objects are created. 2. The maximum lifecycle of a class variable disappears as the class disappears. The lifecycle of instance variables disappears with the disappearance of objects. Static usage considerations: 1. Static methods can only access static members. Non-static methods can both access static and non-static methods. 2. this and super keywords cannot be defined in static methods. Because the static state takes precedence over the object existence. Therefore, this cannot appear in static methods. 3. The main function is static. Static Advantages and Disadvantages: saves space by storing the shared data of objects separately. There is no need to store a copy of each object. Can be called directly by class name. Disadvantage: the lifecycle is too long. Access restrictions. (Although static is good, only static access is allowed)