forked from PacktPublishing/Java-Coding-Problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
28 lines (21 loc) · 954 Bytes
/
Copy pathMain.java
File metadata and controls
28 lines (21 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package modern.challenge;
import static modern.challenge.User.getBuilder;
public class Main {
public static void main(String[] args) {
// user with nickname and password
User user1 = getBuilder("marin21", "hjju9887h").build();
System.out.println("User 1 successfully created on: " + user1.getCreated());
// user with nickname, password and email
User user2 = getBuilder("ionk", "44fef22")
.email("ion@gmail.com")
.build();
System.out.println("User 2 successfully created on: " + user2.getCreated());
// user with nickname, password, email, firstname and lastname
User user3 = getBuilder("monika", "klooi0988")
.email("monika@gmail.com")
.firstName("Monika")
.lastName("Ghuenter")
.build();
System.out.println("User 3 successfully created on: " + user3.getCreated());
}
}