Records reduce boilerplate and emphasize data over behavior.
Records are a perfect fit for simple data carriers because they automatically generate methods like equals(), hashCode(), and toString(), focusing on data representation. For example, a Customer record with fields like name and email can cleanly encapsulate the data without additional boilerplate, making the code base cleaner and more focused.
Additional Notes
Why might you choose a record over a traditional class for a simple data carrier?