Below is my object class:
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class MyObject {
public Long empID;
public String firstName;
public String lastName;
public MyObject(Long empID, String firstName, String lastName) {
super();
this.empID = empID;
this.firstName = firstName;
this.lastName = lastName;
}
@Override
public String toString() {
return "MyObject [empID=" + empID + ", firstName=" + firstName + ", lastName=" + lastName + "]";
}
}
I tried to use and create an object in another class as below:
MyObject myobj = new MyObject();
After typing myObj
, I don't see getEmpId()
or getfirstName()
as if I had written explicit getters and setters.
Kindly suggest a solution if I am missing anything here.
I was able to fix this by downloading Lombok plugin from this Link and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With