A `record` is a concise data carrier. It generates private final fields, a canonical constructor, accessors, `equals`, `hashCode`, and `toString`. It’s a good fit for DTOs/value objects where equality is based on data, but it doesn’t make contained objects immutable.
Expanding on the short answer — what usually matters in practice:
A tiny example (an explanation template):
// Example: discuss trade-offs for "java-`record`:-what-does-it-generate-and-when-is"
function explain() {
// Start from the core idea:
// A `record` is a concise data carrier. It generates private final fields, a canonical const
}