The
static keyword has a slightly
different meaning in
Java than in
C or
C++. Since Java is a purely
Object-Oriented Language, static variables are always members of a
class, and never
local variables of a
method. Static
objects are still created on the global heap and are not associated with any
particular instance of the
class.
You can also define a static block of code that will initialize your static objects the first time the class is instantiated. This can save some typing if you have several constructors.