Java record compact constructors offer a cleaner alternative to canonical constructor delegation for adding validation or default values. Instead of trying to call `this(...)` from within a canonical constructor (which fails to compile), you can use a compact constructor — declared with just the record name and braces, no
Sort: