static.
A class variable belongs to an entire class; it can have only one value.
A class variable is accessed from outside of the class with the class name
followed by the dot operator.
For example, in Brain there is a class variable for the exploitation rate
used in making decisions.
It is declared like this:
public static double exploitationRate;And to access the value of the variable from another class, we do
Brain.exploitationRate.
static.
A static method cannot make reference to any object instance variables or dynamic (non-static)
methods in its body (since it can't possibly know which object is referred to),
unless these are explicitly associated with particular objects.
A static method is called from outside its class using the class name followed
by the dot operator.
For example, to call the static method random() from the built-in
Math class, we do Math.random().