Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > data item > variable > class variable
Next variableglobal variable    Upvariable    Previous variableattribute   

class variable comparison table
Subject declared in mark as have purpose have type be have access by serve as contain is a subtopic of declare by refer to share by is a kind of have scope overuse
Java class variablethe body of the class (not inside a method)staticstoring:
  • Default or 'constant' values that are widely used by methods in a class
  • Lookup tables and similar structures used by algorithms inside a particular class
 as private as possiblea value that is shared by all instances of a classspecifying the name of the class, followed by a dot, followed by the name of the variablea global variabledifferent classes of objects depending on the type of the variableThe Basics of Javagiving the data type followed by the name of the variablea particular object, several different objects during the execution of a program, or no object at allall instances of the classJava variable  

Next variableglobal variable    Upvariable    Previous variableattribute