Skip to main content
PreparationZone Logo
PreparationZone
Back to Java

Java · Medium · Pro

Builder vs telescoping vs records for DTOs?

JavaDesign PatternsSeniorOOP
Model answerPreview

DTO shape trade-offs

Telescoping constructors explode as fields grow. Builders add fluent optional fields and validation at build(). Records give compact immutable carriers with generated equals/hashCode—ideal when the object is pure data.

StyleBest forLimitation
RecordImmutable API responses, eventsNo gradual construction; validation in compact ctor