Skip to content

Instantly share code, notes, and snippets.

@basgys
Created September 23, 2011 21:31
Show Gist options
  • Save basgys/1238491 to your computer and use it in GitHub Desktop.
Save basgys/1238491 to your computer and use it in GitHub Desktop.
Person class
package ch.hegarc.ig.person.business;
public class Person {
private Integer number;
private String firstName;
private String lastName;
public Person() {
this(null, null, null);
}
public Person(Integer number, String firstName, String lastName) {
this.number = number;
this.firstName = firstName;
this.lastName = lastName;
}
public void print() {
System.out.println(String.format("%s %s %s", number.toString(), firstName, lastName));
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment