What changed in Java 16
1 change across 1 question — each with the behaviour it replaced, because “and how did it work before?” is the follow-up.
What is the contract between hashCode() and equals()?
Records generate equals() and hashCode() from all components, so the two can no longer drift apart.
Before: You wrote them by hand or had the IDE generate them — and then added a sixth field and updated neither. Standard in 16; a preview feature in 14 and 15.