Records provide a concise syntax for immutable data carriers.
Records in Java simplify the definition of value objects by handling boilerplate code for you, like getters and equals/hashCode methods. They are inherently immutable, which aligns perfectly with the principles of value objects. For example, a ProductCode record automatically provides these features.