- static variable — one copy for the whole class.
- static method — called with the class name; cannot use
thisor instance members. - static block — runs once when the class loads.
- final — constant variable, method that cannot be overridden, class that cannot be extended (e.g. String).
class Config {
static final double PI = 3.1416; // constant
static int instances;
static { System.out.println("class loaded"); }
Config() { instances++; }
}