-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.java
More file actions
41 lines (36 loc) · 1 KB
/
User.java
File metadata and controls
41 lines (36 loc) · 1 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
38
39
40
41
package Arrays;
public class User {
String name;
int age;
char gen;
long phno;
String boarding ;
String dest;
String email;
public User() {
}
public User(String name, int age, char gen, long phno, String boarding, String dest, String email) {
super();
this.name = name;
this.age = age;
this.gen = gen;
this.phno = phno;
this.boarding = boarding;
this.dest = dest;
this.email = email;
}
public void displayUser() {
System.out.println("Name: "+name);
System.out.println("Age: "+age);
System.out.println("Gender: "+gen);
System.out.println("PhNo: "+phno);
System.out.println("Boarding: "+boarding);
System.out.println("dest: "+dest);
System.out.println("Email: "+email);
System.out.println("-------------------------------");
}
public String toString()
{
return"[Name:"+name+",Gen: "+gen+"]";
}
}