Jump to content

Class variable

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 76.95.140.83 (talk) at 20:49, 3 July 2010 (fixed the definition, since it was incorrect. someone needs to go and clean this up now.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

in object-oriented programming with classes, a class variable is another named for a class-level member. Or a member that is scoped at the class level, rather than having a scope within a method. In many languages (such as Java or C#), a class-level variable is instance-agnostic, that is whether or not it is declared as static or instance is immaterial. In some languages however (such as C++), a class variable referes to a static member (a single copy exists, regardless of how many instances of the class exist).