- Member variable
-
In object-oriented programming, a member variable (sometimes called a member field) is a variable that is associated with a specific class, and accessible for all its methods. If there is only one copy of the variable shared with all instances of the class, it is called a class variable or static member variable. If each instance of the class has its own copy of the variable, the variable is called an instance variable.[1]
References
- ^ Richard G. Baldwin (1999-03-10). "Q - What is a member variable?". http://www.dickbaldwin.com/: Richard G Baldwin Programming Tutorials. http://www.dickbaldwin.com/java/Java020.htm. Retrieved 2011-08-12. "A member variable is a member of a class (class variable) or a member of an object instantiated from that class (instance variable). It must be declared within a class, but not within the body of a method of the class."
See also
Categories:- Object-oriented programming
- Variable (computer programming)
- Computer programming stubs
Wikimedia Foundation. 2010.