Skip to content

Instantly share code, notes, and snippets.

@anjanashankar9
Created January 24, 2022 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanashankar9/cc2b1f56c72bc772fd40d222804fd8c0 to your computer and use it in GitHub Desktop.
Save anjanashankar9/cc2b1f56c72bc772fd40d222804fd8c0 to your computer and use it in GitHub Desktop.
package builder;
public class Main {
public static void main(String[] args) {
User user1 = new User.UserBuilder("Anjana", "Shankar")
.build();
System.out.println(user1);
User user2 = new User.UserBuilder("Random", "User1")
.age(40)
.build();
System.out.println(user2);
User user3 = new User.UserBuilder("Random", "User2")
.age(40)
.email("randomuser2@email.com")
.build();
System.out.println(user3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment