Static variables in ApplicationProgramIt exists in the memory during initialization and disappears only when the program running of the class where it is located is completed;
Non-static variables need to be instantiated before memory allocation
Static variables are allocated when the class is loaded. The memory will be used for all objects created later. The corresponding operation is to operate the memory. It can also be seen as an alternative global variable.
The life cycle of static variables is the application's life cycle;
The existence period of non-static variables depends on the existence period of the instantiated class.
Static variables can only be called by "class. static variable name", but cannot be called by class instances;
Non-static variables can be directly accessed by the instantiated class name after the class where the variable is located is instantiated.
Static variables are global variables shared by all class instance objects, that is, the value of static variables is changed for one instance, and those of other similar instances read the changed values;
Non-static variables are local variables and are not shared.
Static members cannot access non-static members. Non-static members can access static members.