Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > data item > variable > class variable > Java class variable
Upclass variable, Java variable

Java class variable comparison table
Subject serve as declare by have be is a kind of is a synonym of have purpose access by declared in has definition mark as share by
class variable  a value that is shared by all instances of a class variablestatic variablestoring:
  • 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
  A data item present in a class that is shared by all instances of that class all instances of the class
Java variable giving the data type followed by the name of the variablean interface as its type which means that, with the variable, you can invoke any operation supported by the interfaceas private as possiblevariable  other variables and methods in any class in the same package by default    
Java class variablea global variablegiving the data type followed by the name of the variablea value that is shared by all instances of a classas private as possibleJava variable storing:
  • 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
specifying the name of the class, followed by a dot, followed by the name of the variablethe body of the class (not inside a method) staticall instances of the class

Upclass variable, Java variable