Class variables
(not instance variables) and class methods
are shared by all instances of the class.
There is only one copy of a class variable.
protected
static int numInstances = 0; // a class variable
MyObject() {
numInstances++; } // a constructor
public static
void main(String [] argv) {} // a class method
Class variables and methods can be used even if
there are no instances of the
class. Class variables can serve as global variables in a program.