Record components are accessed directly by their names.
In Java Records, accessor methods are named after the fields themselves, not prefixed with 'get'. This is because records are designed to be simple data carriers, and this naming convention reflects that simplicity. For example, if you have `record Customer(String name, int age)`, you would access the fields using `customer.name()` and `customer.age()`, not `customer.getName()` or `customer.getAge()`.
Additional Notes
Why do accessor methods in Java Records drop the ‘get’ prefix?