forked from techreturners/java_coding_exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
33 lines (26 loc) · 653 Bytes
/
Person.java
File metadata and controls
33 lines (26 loc) · 653 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
29
30
31
32
33
package com.techreturners.exercise002;
public class Person {
// Fields
private String firstName;
private String lastName;
private String city;
private int age;
public Person(String firstName, String lastName, String city, int age) {
this.firstName = firstName;
this.lastName = lastName;
this.city = city;
this.age = age;
}
public String getFirstName() {
return this.firstName;
}
public String getLastName() {
return this.lastName;
}
public String getCity() {
return this.city;
}
public int getAge() {
return this.age;
}
}