Constructors features in Lombok

Viewed 4543

If I have a class with three instance variables and one instance final variable.

Will I be restricted from creating the instance of that class using the no-argument constructor?

public @Data class Employee {

    private Integer empId;

    private String empName;

    private Country country;

    private final Integer var;

}

When tried to compile the following line

Employee emp = new Employee();

Then, I got this error

requires argument to match Employee(Integer).

4 Answers
Related