Employ Java Records

If you are using Java 15 or above - use records in your modelling classes. Records are a new type of class enabling the creation of immutable data objects.
// Prior to Java 15
public class Employee {
    private final int age;
    private final String name;   
    public Employee(int age, String name) {
        this.age = age;
        this.name = name;
    public int getAge() { return age; }
    public void getName(String name) { return name; }                 

// With Java 15
public record Employee(int age, String name) {}
The member accessors are provided by default with the new record keyword (without the get prefix), with a constructor also no longer required (instantiation being the same as the initial example).

Static Variables & Methods

Similarly to standard Java classes - static variables and methods can be included inside Java records.
public record Employee(int age, String name) {
    public static String REFERENCE = "B12-GHI";
    public static int dummyEmployee() {
        return new Employee(75, "John Doe");

public class TestRecord {
    public void getRecordDetails() {