First time using lombok, and if I'm understanding it correctly, lomboks getter and setter annotations generates setter and getter methods without having to code it, but for some reason I'm getting an "undefined method" error whenever I try to call a getter/setter method.
What's wrong here?
import lombok.Getter;
import lombok.Setter;
public class Student {
@Getter @Setter
private String firstName;
@Getter @Setter
private String lastName;
public Student(String firstName, String lastName) {
super();
this.setFirstName(firstName); // method undefined error here
this.setLastName(lastName); // method undefined error here
}
}
Your code sould work as this, Did you install lombok's plugin on your EDI ?