Instantly share code, notes, and snippets.

@cajar1988 /Person.java Secret
Last active Oct 30, 2015

Embed
What would you like to do?
Pure Java
package eu.lockup.tests;
public class Person {
private final String firstName;
private final String lastName;
private final int age;
private final Address address;
private String hobby;
public Person(String firstName, String lastName, int age, Address address) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.address = address;
}
public Person(String firstName, String lastName, int age, Address address, String hobby) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.address = address;
this.hobby = hobby;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public int getAge() {
return age;
}
public Address getAddress() {
return address;
}
public String getHobby() {
return hobby;
}
public void setHobby(String hobby) {
this.hobby = hobby;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment