Discussion about this post

User's avatar
Vik's avatar

record is good java feature. But what about @Builder of lombok feature? It looks like

@Builder

public class UserInfo {

private String userName;

private String password;

private String firstName;

private String lastName;

private int birthDay;

private int birthMonth;

private int birthYear;

private String streetName;

private String city;

private String postalCode;

private String province;

private String country;

}

public UserInfo getUserInfo() {

return UserInfo.builder().userName(userName)...build();

}

Expand full comment
1 more comment...

No posts