When to reach for a Java record and when to keep a class, plus six practices in code: validate and normalize in the compact constructor, freeze collections, copy arrays both ways, static factories, sealed variants, and the anti-patterns that still compile.