Created
January 24, 2022 10:06
-
-
Save anjanashankar9/cc2b1f56c72bc772fd40d222804fd8c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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