Back to Developer Roadmap

Record

src/data/roadmaps/java/content/[email protected]

4.0583 B
Original Source

Record

A record is a special type of class in Java that is designed to hold immutable data. It automatically generates methods like equals(), hashCode(), and toString() based on the components declared in its header, reducing boilerplate code. Records are useful for creating data transfer objects (DTOs) or simple data aggregates where the primary purpose is to store and access data.

Visit the following resources to learn more: