-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserRegistrationProgram.java
More file actions
37 lines (33 loc) · 1.12 KB
/
UserRegistrationProgram.java
File metadata and controls
37 lines (33 loc) · 1.12 KB
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
29
30
31
32
33
34
35
36
37
class UserRegistration {
String name;
int age;
String gender;
String phoneNumber;
String address;
public static void main(String [] args) {
UserRegistration user = new UserRegistration(args[0], Integer.parseInt(args[1]), args[2], args[3], args[4]);
user.output();
UserRegistration user1 = new UserRegistration();
}
UserRegistration(String name, int age, String gender, String phoneNumber, String address){
this.name = name;
this.age = age;
this.gender = gender;
this.phoneNumber = phoneNumber;
this.address = address;
System.out.println("Hello2");
}
UserRegistration() {
System.out.println("Hello");
}
void output() {
System.out.println("Name: " + name);
System.out.println("Age: " + age);
System.out.println("Gender: " + gender);
System.out.println("Phone Number: " + phoneNumber);
System.out.println("Address: " + address);
System.out.println("++++++++++++++");
System.out.println("Your information was registered.");
System.out.println("++++++++++++++");
}
}