Enums in Java: from constants to classes, strategies and exhaustive switches
Why enums beat static final constants, enums as classes (fields, constructors, constant-specific bodies, strategies), the traps in valueOf/values/ordinal, exhaustive switches, and when to move to a sealed interface with records.