unable to create object in java with lombok **noargsconstructor **added with Pojo Class
I have created a** POJO class Employee**. Code mentioned below-
@Data @NoArgsConstructor @AllArgsConstructor(access = AccessLevel.PUBLIC) @Builder public class Employee {
@NonNull int employeeId; @NonNull private String firstName; @NonNull private String middleName; @NonNull private String lastName;
}
In Another class, i want to create object of Employee class using the below code
Employee e1= new Employee(1,"firstTest","middleTest","lastTest");**
// Unable to instantiate this class with the values. Seems that @NoArgsConstructor is not working. //Compile time error occured
Any help / suggestion would be much appreciate. Thank You.