Some information should be obtained for accessing the Internet for static and non-static problems. The following describes some materials.
It should be a non-static member that depends on the instance, so it can also be called an instance Member.
Class members include:
Data member:
Data members can be divided into static variables and instance variables.
Static member: a static member variable is associated with a class and can be used as a "common" variable in the class (a common expression). It does not depend on the existence of a specific object, you can use the class name adding operator and variable name to access the service.
Instance Member: The instance member variable is associated with the object, and the access instance member variable depends on the existence of the instance.
Function member:
Methods can be divided into static methods and instance methods.
Static Method: static method is a method that does not belong to a specific object. Static methods can access static member variables. Static methods cannot directly access instance variables. In the case of instance function calls, the instance variables are passed as parameters to the static method. Static methods cannot directly call instance methods. They can be called indirectly. First, you must create a class instance and then call the instance method through this specific object, but you can call static methods.
Instance method: the execution of an instance method is associated with a specific object. Its execution requires an object to exist. The instance method can directly access static variables and instance variables. The instance method can directly access the instance method and static method. The static method can be accessed by adding a variable name to the class name operator. When multiple instance objects exist, the memory does not contain copies of a specific instance method. Instead, all objects of the same class share a copy of each instance method (the instance method only occupies one set of space ).
TheArticleReproduced from the network base camp: http://www.xrss.cn/Info/10951.Html